]> scripts.mit.edu Git - wizard.git/blobdiff - lib/wizard/command/summary.py
Final touches on migration script.
[wizard.git] / lib / wizard / command / summary.py
index 689225c139c97a191f3081844b5a05d6c9b73a10..c84348b271aec20a0ddb01a1e9525b92539ddc77 100644 (file)
@@ -34,7 +34,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 +74,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 +90,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))