]> scripts.mit.edu Git - wizard.git/blobdiff - bin/wizard
Implement interactive mode without validation.
[wizard.git] / bin / wizard
index 1dc3144f529579f263b5dc64086234eb242aa290..e492a5388a69ee2f3629bc69bbce3433c1df5dc7 100755 (executable)
@@ -12,7 +12,7 @@ import decorator
 sys.path.insert(0,os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 
 import wizard
-from wizard import command
+from wizard import command, prompt
 
 def main():
     usage = """usage: %prog COMMAND [ARGS]
@@ -89,6 +89,9 @@ See '%prog help COMMAND' for more information on a specific command."""
     command_module = get_command(command_name)
     try:
         command_module.main(rest_argv, baton)
+    except prompt.UserCancel as e:
+        print str(e)
+        sys.exit(1)
     except Exception as e:
         # log the exception
         msg = traceback.format_exc()