Commit d131f572 authored by Andreas Jung's avatar Andreas Jung

zdoptions raised an exception because sys.argv is not available

if one tries to embed Zope within C/C++.
parent 4babe9e1
......@@ -122,6 +122,9 @@ Zope Changes
Bugs fixed
- Zope can now be embedded in C/C++ without exceptions being raised
in zdoptions.
- Collector #1213: Fixed wrong labels of cache parameters
- Collector #1265: Fixed handling of orphans in ZTUtil.Batch
......
......@@ -201,9 +201,17 @@ class ZDOptions:
# Provide dynamic default method arguments
if args is None:
try:
args = sys.argv[1:]
except AttributeError:
args = ()
if progname is None:
try:
progname = sys.argv[0]
except AttributeError:
progname = 'zope'
if doc is None:
import __main__
doc = __main__.__doc__
......
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