]> scripts.mit.edu Git - wizard.git/blob - wizard/command/summary/list_errors.py
Add creation of .scripts/version for easy parallel-find.
[wizard.git] / wizard / command / summary / list_errors.py
1 import logging
2
3 from wizard import deploy, command
4 from wizard.command import summary
5
6 def main(argv, baton):
7     options, show = parse_args(argv, baton)
8     for e in summary.parse_install_lines(show, options, True):
9         if not isinstance(e, deploy.Error):
10             if isinstance(e, Exception):
11                 raise e
12             continue
13         if options.verbose:
14             print e
15         else:
16             print e.location
17
18 def parse_args(argv, baton):
19     usage = """usage: %prog summary list-errors [ARGS]
20
21 Lists all errors that occurred while parsing the versions
22 directory."""
23     parser = command.WizardOptionParser(usage)
24     baton.push(parser, "versions_path")
25     options, args = parser.parse_all(argv)
26     if len(args) > 1:
27         parser.error("too many arguments")
28     return options, args
29