[Zope3-checkins] SVN: zdaemon/trunk/zdoptions.py Merge changes made
from a wrong project:
Tim Peters
tim.one at comcast.net
Mon Jan 24 10:49:12 EST 2005
Log message for revision 28923:
Merge changes made from a wrong project:
r25220 | andreasjung | 2004-06-03 02:47:40 -0400 (Thu, 03 Jun 2004) | 4 lines
Changed paths:
M /Zope/trunk/doc/CHANGES.txt
M /Zope/trunk/lib/python/zdaemon/zdoptions.py
zdoptions raised an exception because sys.argv is not available
if one tries to embed Zope within C/C++.
Changed:
U zdaemon/trunk/zdoptions.py
-=-
Modified: zdaemon/trunk/zdoptions.py
===================================================================
--- zdaemon/trunk/zdoptions.py 2005-01-24 15:21:12 UTC (rev 28922)
+++ zdaemon/trunk/zdoptions.py 2005-01-24 15:49:12 UTC (rev 28923)
@@ -202,9 +202,17 @@
# Provide dynamic default method arguments
if args is None:
- args = sys.argv[1:]
+ try:
+ args = sys.argv[1:]
+ except AttributeError:
+ args = ()
+
if progname is None:
- progname = sys.argv[0]
+ try:
+ progname = sys.argv[0]
+ except AttributeError:
+ progname = 'zope'
+
if doc is None:
import __main__
doc = __main__.__doc__
More information about the Zope3-Checkins
mailing list