[Checkins] SVN: z3c.pt/trunk/src/z3c/pt/config.py Allow a broader set of values to represent true.

Chris McDonough chrism at plope.com
Tue Aug 12 02:01:00 EDT 2008


Log message for revision 89694:
  Allow a broader set of values to represent true.
  

Changed:
  U   z3c.pt/trunk/src/z3c/pt/config.py

-=-
Modified: z3c.pt/trunk/src/z3c/pt/config.py
===================================================================
--- z3c.pt/trunk/src/z3c/pt/config.py	2008-08-12 03:44:17 UTC (rev 89693)
+++ z3c.pt/trunk/src/z3c/pt/config.py	2008-08-12 06:00:58 UTC (rev 89694)
@@ -1,14 +1,16 @@
 import os
 
+truevals = ('y', 'yes', 't', 'true', 'on', '1')
+
 DEBUG_MODE_KEY = 'Z3C_PT_DEBUG'
 DEBUG_MODE = os.environ.get(DEBUG_MODE_KEY, 'false')
-DEBUG_MODE = DEBUG_MODE.lower() in ('yes', 'true', 'on')
+DEBUG_MODE = DEBUG_MODE.lower() in truevals
 
 PROD_MODE = not DEBUG_MODE
 
 DISABLE_I18N_KEY = 'Z3C_PT_DISABLE_I18N'
 DISABLE_I18N = os.environ.get(DISABLE_I18N_KEY, 'false')
-DISABLE_I18N = DISABLE_I18N.lower() in ('yes', 'true', 'on')
+DISABLE_I18N = DISABLE_I18N.lower() in truevals
 
 XML_NS = "http://www.w3.org/1999/xhtml"
 TAL_NS = "http://xml.zope.org/namespaces/tal"



More information about the Checkins mailing list