[Zope3-checkins] CVS: Zope3/src/zope/fssync - command.py:1.4

Fred L. Drake, Jr. fred at zope.com
Tue Aug 12 14:12:56 EDT 2003


Update of /cvs-repository/Zope3/src/zope/fssync
In directory cvs.zope.org:/tmp/cvs-serv28360

Modified Files:
	command.py 
Log Message:
- add help text for the default "help" command
- fix passing the long options to addCommand() for "help" aliases


=== Zope3/src/zope/fssync/command.py 1.3 => 1.4 ===
--- Zope3/src/zope/fssync/command.py:1.3	Tue Aug 12 12:58:24 2003
+++ Zope3/src/zope/fssync/command.py	Tue Aug 12 13:12:50 2003
@@ -62,7 +62,7 @@
         short, long, func = self.command_table["help"]
         for alias in ("h", "?"):
             if alias not in self.command_table:
-                self.addCommand(alias, func, short, long)
+                self.addCommand(alias, func, short, " ".join(long))
         if args is None:
             args = sys.argv[1:]
         self.global_options, args = self.getopt("global",
@@ -100,6 +100,12 @@
         print >>file, text % {"program": self.program}
 
     def help(self, opts, args):
+        """%(program)s help [COMMAND ...]
+
+        Display help text.  If COMMAND is specified, help text about
+        each named command is displayed, otherwise general help about
+        using %(program)s is shown.
+        """
         if not args:
             self.usage(sys.stdout, self.helptext)
         else:




More information about the Zope3-Checkins mailing list