Commit 6820e9ce authored by Jim Fulton's avatar Jim Fulton

Added Z_REALM and Z_DEBUG_MODE.

parent 246451d3
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
############################################################################## ##############################################################################
__doc__="""Python Object Publisher -- Publish Python objects on web servers __doc__="""Python Object Publisher -- Publish Python objects on web servers
$Id: Publish.py,v 1.111 1998/12/04 20:15:32 jim Exp $""" $Id: Publish.py,v 1.112 1998/12/08 19:08:54 jim Exp $"""
__version__='$Revision: 1.111 $'[11:-2] __version__='$Revision: 1.112 $'[11:-2]
import sys, os, string, cgi, regex import sys, os, string, cgi, regex
from string import lower, atoi, rfind, split, strip, join, upper, find from string import lower, atoi, rfind, split, strip, join, upper, find
...@@ -613,6 +613,8 @@ def get_module_info(module_name, modules={}, ...@@ -613,6 +613,8 @@ def get_module_info(module_name, modules={},
# Let the app specify a realm # Let the app specify a realm
if hasattr(module,'__bobo_realm__'): if hasattr(module,'__bobo_realm__'):
realm=module.__bobo_realm__ realm=module.__bobo_realm__
elif os.environ.has_key('Z_REALM'):
realm=os.environ['Z_REALM']
elif os.environ.has_key('BOBO_REALM'): elif os.environ.has_key('BOBO_REALM'):
realm=os.environ['BOBO_REALM'] realm=os.environ['BOBO_REALM']
else: realm=module_name else: realm=module_name
...@@ -620,7 +622,11 @@ def get_module_info(module_name, modules={}, ...@@ -620,7 +622,11 @@ def get_module_info(module_name, modules={},
# Check for debug mode # Check for debug mode
if hasattr(module,'__bobo_debug_mode__'): if hasattr(module,'__bobo_debug_mode__'):
debug_mode=not not module.__bobo_debug_mode__ debug_mode=not not module.__bobo_debug_mode__
elif os.environ.has_key('BOBO_DEBUG_MODE'): elif (os.environ.has_key('Z_DEBUG_MODE') or
os.environ.has_key('BOBO_DEBUG_MODE')):
if os.environ.has_key('Z_DEBUG_MODE'):
debug_mode=lower(os.environ['Z_DEBUG_MODE'])
else:
debug_mode=lower(os.environ['BOBO_DEBUG_MODE']) debug_mode=lower(os.environ['BOBO_DEBUG_MODE'])
if debug_mode=='y' or debug_mode=='yes': if debug_mode=='y' or debug_mode=='yes':
debug_mode=1 debug_mode=1
......
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