[Checkins] SVN: z3c.pt/trunk/ Made the debug mode independent from
the Python debug mode. You can now specify an environment
variable called `Z3C_PT_DEBUG` to enable it. Thx to Tres
Seaver for the suggestion!
Hanno Schlichting
plone at hannosch.info
Sun Jun 15 16:48:53 EDT 2008
Log message for revision 87416:
Made the debug mode independent from the Python debug mode. You can now specify an environment variable called `Z3C_PT_DEBUG` to enable it. Thx to Tres Seaver for the suggestion!
Changed:
U z3c.pt/trunk/docs/HISTORY.txt
U z3c.pt/trunk/src/z3c/pt/config.py
-=-
Modified: z3c.pt/trunk/docs/HISTORY.txt
===================================================================
--- z3c.pt/trunk/docs/HISTORY.txt 2008-06-15 20:46:10 UTC (rev 87415)
+++ z3c.pt/trunk/docs/HISTORY.txt 2008-06-15 20:48:52 UTC (rev 87416)
@@ -4,6 +4,9 @@
Version 0.8.x
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+- Made the debug mode independent from the Python debug mode. You can now
+ specify an environment variable called `Z3C_PT_DEBUG` to enable it.
+
- Added some code in a filecache module that can later be used to write out
and reload the compiled Python code to and from the file system. We should
be able to avoid reparsing on Python process restart.
Modified: z3c.pt/trunk/src/z3c/pt/config.py
===================================================================
--- z3c.pt/trunk/src/z3c/pt/config.py 2008-06-15 20:46:10 UTC (rev 87415)
+++ z3c.pt/trunk/src/z3c/pt/config.py 2008-06-15 20:48:52 UTC (rev 87416)
@@ -1,2 +1,6 @@
-DEBUG_MODE = __debug__
+import os
+
+DEBUG_MODE = os.environ.get('Z3C_PT_DEBUG', 'false')
+DEBUG_MODE = DEBUG_MODE.lower() in ('yes', 'true', 'on')
+
PROD_MODE = not DEBUG_MODE
More information about the Checkins
mailing list