Commit fa552e80 authored by Chris McDonough's avatar Chris McDonough

Fix debug mode config file option (debug mode was always off before this fix).

parent fee42345
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
"""Global definitions""" """Global definitions"""
__version__='$Revision: 1.55 $'[11:-2] __version__='$Revision: 1.56 $'[11:-2]
# Global constants: __replaceable__ flags: # Global constants: __replaceable__ flags:
NOT_REPLACEABLE = 0 NOT_REPLACEABLE = 0
...@@ -44,17 +44,10 @@ data_dir = _cfg.clienthome ...@@ -44,17 +44,10 @@ data_dir = _cfg.clienthome
INSTANCE_HOME = _cfg.instancehome INSTANCE_HOME = _cfg.instancehome
SOFTWARE_HOME = _cfg.softwarehome SOFTWARE_HOME = _cfg.softwarehome
ZOPE_HOME = _cfg.zopehome ZOPE_HOME = _cfg.zopehome
del _cfg, _getConfiguration
opened=[] opened=[]
# Check,if DEBUG variables are set DevelopmentMode=_cfg.debug_mode
DevelopmentMode=None
z1 = os.environ.get('Z_DEBUG_MODE','') del _cfg, _getConfiguration
z2 = os.environ.get('BOBO_DEBUG_MODE','')
if z1.lower() in ('yes','y') or z1.isdigit():
DevelopmentMode=1
elif z2.lower() in ('yes','y') or z2.isdigit():
DevelopmentMode=1
...@@ -17,6 +17,8 @@ def _setenv(name, value): ...@@ -17,6 +17,8 @@ def _setenv(name, value):
def debug_mode(value): def debug_mode(value):
value and _setenv('Z_DEBUG_MODE', '1') value and _setenv('Z_DEBUG_MODE', '1')
import Globals
Globals.DevelopmentMode = not not value
return value return value
def enable_product_installation(value): def enable_product_installation(value):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment