[Zope-dev] zopectl's -p options
Chris Withers
chris at simplistix.co.uk
Mon Jul 26 13:36:25 EDT 2010
...is currently useless, as far as I can see.
This stops you specifying a different location for runzope, which is
handy if you're doing buildout-based stuff that uses a deployment.
I think the attached patch fixes this, but I'm wondering:
- are these are tests for this area
- why does self.program need to be a one element list?
cheers,
Chris
===================================================================
--- src/Zope2/Startup/zopectl.py (revision 115104)
+++ src/Zope2/Startup/zopectl.py (working copy)
@@ -114,11 +114,14 @@
positional_args_allowed = 1
- program = "zopectl"
schemadir = os.path.dirname(Zope2.Startup.__file__)
schemafile = "zopeschema.xml"
uid = gid = None
+ # this indicates that no explict program has been provided.
+ # the command line option can set this.
+ program = None
+
# XXX Suppress using Zope's <eventlog> section to avoid using the
# same logging for zdctl as for the Zope appserver. There still
# needs to be a way to set a logfile for zdctl.
@@ -169,7 +172,9 @@
config = self.configroot
self.directory = config.instancehome
self.clienthome = config.clienthome
- if config.runner and config.runner.program:
+ if self.program:
+ self.program = [self.program]
+ elif config.runner and config.runner.program:
self.program = config.runner.program
else:
self.program = [os.path.join(self.directory, "bin",
"runzope")]
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
More information about the Zope-Dev
mailing list