[Zope-Checkins] CVS: Zope3/src/zdaemon - zdctl.py:1.50

Stephan Richter srichter at cosmos.phy.tufts.edu
Tue Mar 23 10:51:56 EST 2004


Update of /cvs-repository/Zope3/src/zdaemon
In directory cvs.zope.org:/tmp/cvs-serv1578/src/zdaemon

Modified Files:
	zdctl.py 
Log Message:


Add the ability to pass a schema to the zdctl program.




=== Zope3/src/zdaemon/zdctl.py 1.49 => 1.50 ===
--- Zope3/src/zdaemon/zdctl.py:1.49	Thu Feb 26 19:31:58 2004
+++ Zope3/src/zdaemon/zdctl.py	Tue Mar 23 10:51:55 2004
@@ -14,11 +14,12 @@
 ##############################################################################
 """zdctl -- control an application run by zdaemon.
 
-Usage: python zdctl.py [-C URL] [-h] [-p PROGRAM]
+Usage: python zdctl.py [-C URL] [-S schema.xml] [-h] [-p PROGRAM]
        [zdrun-options] [action [arguments]]
 
 Options:
 -C/--configuration URL -- configuration file or URL
+-S/--configuration XML Schema -- XML schema for configuration file
 -h/--help -- print usage message and exit
 -b/--backoff-limit SECONDS -- set backoff limit to SECONDS (default 10)
 -d/--daemon -- run as a proper daemon; fork a subprocess, close files etc.
@@ -71,6 +72,8 @@
 
     def __init__(self):
         RunnerOptions.__init__(self)
+        self.add("schemafile", short="S:", default="schema.xml",
+                 handler=self.set_schemafile)
         self.add("interactive", None, "i", "interactive", flag=1)
         self.add("default_to_interactive", "runner.default_to_interactive",
                  default=1)
@@ -104,6 +107,10 @@
             file = os.path.normpath(os.path.abspath(file))
             dir = os.path.dirname(file)
             self.zdrun = os.path.join(dir, "zdrun.py")
+
+    def set_schemafile(self, file):
+        self.schemafile = file
+
 
 
 class ZDCmd(cmd.Cmd):




More information about the Zope-Checkins mailing list