]> scripts.mit.edu Git - wizard.git/blobdiff - bin/wizard
Fix misnamed variable bug.
[wizard.git] / bin / wizard
index 95ad1725ff9fcec3c7b3a4954d95c92e9a60f8a2..6ff98a4ad3c850431a14275a623ab0c341cf4772 100755 (executable)
@@ -40,16 +40,17 @@ See '%prog help COMMAND' for more information on a specific command."""
         raise SystemExit(1)
     if command_name == "help":
         try:
-            get_command(rest_argv[0]).main(['--help'], baton)
-        except (AttributeError, ImportError):
+            help_module = get_command(rest_argv[0])
+        except ImportError:
             parser.error("invalid action")
         except IndexError:
             parser.print_help()
             raise SystemExit(1)
+        help_module.main(['--help'], baton)
     # Dispatch commands
     try:
         command_module = get_command(command_name)
-    except (AttributeError, ImportError):
+    except ImportError:
         parser.error("invalid action")
     command_module.main(rest_argv, baton)