X-Git-Url: https://scripts.mit.edu/gitweb/wizard.git/blobdiff_plain/a17fd359259cba31cdfee7867e476e7afbbe1fa5..a19b4fb59bafd03043b0cee1014dd454ac342e60:/wizard/command/errors.py diff --git a/wizard/command/errors.py b/wizard/command/errors.py new file mode 100644 index 0000000..5250254 --- /dev/null +++ b/wizard/command/errors.py @@ -0,0 +1,28 @@ +import logging + +from wizard import deploy, command + +def main(argv, baton): + options, show = parse_args(argv, baton) + for e in deploy.parse_install_lines(show, options, True): + if not isinstance(e, deploy.Error): + if isinstance(e, Exception): + raise e + continue + if options.verbose: + print e + else: + print e.location + +def parse_args(argv, baton): + usage = """usage: %prog errors [ARGS] + +Lists all errors that occurred while parsing the versions +directory.""" + parser = command.WizardOptionParser(usage) + baton.push(parser, "versions_path") + options, args = parser.parse_all(argv) + if len(args) > 1: + parser.error("too many arguments") + return options, args +