X-Git-Url: https://scripts.mit.edu/gitweb/wizard.git/blobdiff_plain/f2311a36498329ad2de242ab483e91c04c39cde0..af6a8570c69b165f4349eb335d356daf716f2aec:/lib/wizard/command/summary.py diff --git a/lib/wizard/command/summary.py b/lib/wizard/command/summary.py index 689225c..2672403 100644 --- a/lib/wizard/command/summary.py +++ b/lib/wizard/command/summary.py @@ -2,6 +2,7 @@ import optparse import wizard.deploy as wd import sys +# XXX: Migrate this to use logger class Printer(object): def __init__(self, quiet, verbose): self.i = 0 @@ -34,7 +35,7 @@ class Printer(object): self._hang() print str -def main(argv, global_options): +def summary(argv, global_options): usage = """usage: %prog summary [ARGS] APPS Scans all of the collected data from parallel-find.pl, and @@ -74,10 +75,11 @@ Examples: except wd.NoSuchApplication: unrecognized += 1 continue - if deploy.application.name + "-" + str(deploy.getVersion()) in show: + name = deploy.getApplication().name + if name + "-" + str(deploy.getVersion()) in show: printer.write("%s-%s deployment at %s" \ - % (deploy.application.name, deploy.getVersion(), deploy.location)) - elif deploy.application.name in show: + % (name, deploy.getVersion(), deploy.location)) + elif name in show: pass else: continue @@ -89,7 +91,7 @@ Examples: printer.write() for app in wd.applications.values(): if app.name not in show: continue - printer.write(app) + printer.write(app.report()) printer.write() printer.write("With %d errors and %d unrecognized applications" % (errors, unrecognized))