Catch AttributeError when a command has no help() def'd.
authorThomas Gerigk <tgerigk@gmx.de>
Mon, 3 Apr 2006 16:54:45 +0000 (18:54 +0200)
committerThomas Gerigk <tgerigk@gmx.de>
Mon, 3 Apr 2006 16:54:45 +0000 (18:54 +0200)
becommands/help.py

index fc8920759d88e570af7c9bce86073c45d9ca6250..2f37ec2b2c4b90a6a1adeb3580d778a04c552a14 100644 (file)
@@ -27,7 +27,11 @@ def execute(args):
         for name, module in cmdutil.iter_commands():
             print "be %s\n     %s" % (name, module.__doc__)
     else:
-        print cmdutil.help(args[0])
+        try:
+            print cmdutil.help(args[0])
+        except AttributeError:
+            print "No help available"
+    
     return