]> scripts.mit.edu Git - wizard.git/commitdiff
Fix broken imports and exceptions.
authorEdward Z. Yang <ezyang@mit.edu>
Fri, 31 Jul 2009 04:21:33 +0000 (00:21 -0400)
committerEdward Z. Yang <ezyang@mit.edu>
Fri, 31 Jul 2009 04:21:33 +0000 (00:21 -0400)
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
bin/wizard
wizard/deploy.py

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)
 
index e6f591872a38378797c89508605a4c33be9c7016..e6ab0cfedda3b4e41f75024bb0271bb89fcd0e48 100644 (file)
@@ -23,11 +23,11 @@ def parse_install_lines(show, options, yield_errors = False):
         try:
             d = Deployment.parse(line)
             name = d.application.name
-        except deploy.NoSuchApplication as e:
+        except NoSuchApplication as e:
             if yield_errors:
                 yield e
             continue
-        except deploy.Error:
+        except Error:
             # we consider this a worse error
             logging.warning("Error with '%s'" % line.rstrip())
             continue