From 33c58b0b437fb89e60c98185d937f8df64e205b1 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Fri, 31 Jul 2009 00:21:33 -0400 Subject: [PATCH] Fix broken imports and exceptions. Signed-off-by: Edward Z. Yang --- bin/wizard | 7 ++++--- wizard/deploy.py | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/wizard b/bin/wizard index 95ad172..6ff98a4 100755 --- a/bin/wizard +++ b/bin/wizard @@ -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) diff --git a/wizard/deploy.py b/wizard/deploy.py index e6f5918..e6ab0cf 100644 --- a/wizard/deploy.py +++ b/wizard/deploy.py @@ -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 -- 2.45.0