[Zope-Checkins] CVS: Zope/utilities/ZODBTools - zodbload.py:1.2.2.3

Fred L. Drake, Jr. fred at zope.com
Thu Oct 2 15:37:05 EDT 2003


Update of /cvs-repository/Zope/utilities/ZODBTools
In directory cvs.zope.org:/tmp/cvs-serv32483

Modified Files:
      Tag: Zope-2_7-branch
	zodbload.py 
Log Message:
we don't need to mutate sys.argv to control the options seen by the
zdoptions engine


=== Zope/utilities/ZODBTools/zodbload.py 1.2.2.2 => 1.2.2.3 ===
--- Zope/utilities/ZODBTools/zodbload.py:1.2.2.2	Thu Oct  2 15:16:09 2003
+++ Zope/utilities/ZODBTools/zodbload.py	Thu Oct  2 15:37:05 2003
@@ -724,10 +724,6 @@
     if options["mbox"]:
         mboxes[options["mbox"]] = MBox(options["mbox"])
 
-    # ZConfig processes command-line arguments for it's own purposes.
-    # We need to hide ours, which it doesn't understand.
-    del sys.argv[1:]
-
     # Perform a ZConfig-based Zope initialization:
     zetup(os.path.join(lib_python, '..', '..', 'etc', 'zope.conf'))
 
@@ -775,10 +771,10 @@
     from Zope.Startup.options import ZopeOptions
     from Zope.Startup import handlers as h
     from App import config
-    opts=ZopeOptions()
-    opts.configfile=configfile_name
-    opts.realize()
-    h.handleConfig(opts.configroot,opts.confighandlers)
+    opts = ZopeOptions()
+    opts.configfile = configfile_name
+    opts.realize(args=[])
+    h.handleConfig(opts.configroot, opts.confighandlers)
     config.setConfiguration(opts.configroot)
     from Zope.Startup import dropPrivileges
     dropPrivileges(opts.configroot)




More information about the Zope-Checkins mailing list