[4suite-checkins] [XML1_0-maint] In 4Suite/Ft/Lib/CommandLine, files CommandLineApp.py

Mike Brown mbrown at 4suite.org
Wed Nov 29 16:34:17 MST 2006


Branch: XML1_0-maint

Modified Files:
    CommandLineApp.py

Log Message:
check that verbose_description isn't None before passing it to Wrap(), to prevent "command -h" traceback

ViewCVS diff:
  http://cvs.4suite.org/viewcvs/4Suite/Ft/Lib/CommandLine/CommandLineApp.py.diff?r1=1.20.2.1&r2=1.20.2.2
ViewCVS view:
  http://cvs.4suite.org/viewcvs/4Suite/Ft/Lib/CommandLine/CommandLineApp.py?rev=1.20.2.2&content-type=text/vnd.viewcvs-markup

Index: CommandLineApp.py
===================================================================
RCS file: /var/local/cvsroot/4Suite/Ft/Lib/CommandLine/CommandLineApp.py,v
retrieving revision 1.20.2.1
retrieving revision 1.20.2.2
diff -U2 -r1.20.2.1 -r1.20.2.2
--- CommandLineApp.py	16 Oct 2006 21:52:35 -0000	1.20.2.1
+++ CommandLineApp.py	29 Nov 2006 23:34:17 -0000	1.20.2.2
@@ -174,6 +174,7 @@
 
         lines = [self._get_version(command_string)]
-        lines.extend(['  %s' % line for line in CommandLineUtil.wrap_text(command.verbose_description,
-                      CONSOLE_WIDTH - 4)])
+        if command.verbose_description:
+            lines.extend(['  %s' % line for line in CommandLineUtil.wrap_text(
+                         command.verbose_description, CONSOLE_WIDTH - 4)])
         lines.append('\nUsage:')
         lines.extend(command._gen_usage('  %s ' % command_string))


More information about the 4suite-checkins mailing list