From: Thomas Gerigk Date: Mon, 3 Apr 2006 16:54:45 +0000 (+0200) Subject: Catch AttributeError when a command has no help() def'd. X-Git-Tag: 1.0.0~199^2~5^2~9 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6cd159334b3d23e515926a566c751f1fc006bfe9;p=be.git Catch AttributeError when a command has no help() def'd. --- diff --git a/becommands/help.py b/becommands/help.py index fc89207..2f37ec2 100644 --- a/becommands/help.py +++ b/becommands/help.py @@ -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