]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/command/info.py
Move a bunch of summary items to full class commands.
[wizard.git] / wizard / command / info.py
index 5fe42d6dceb59b847e2b2dc46d129717708f4206..2fd47d267a79b3a803c01c4133842c551caae6be 100644 (file)
@@ -2,12 +2,12 @@ import optparse
 import sys
 import subprocess
 
-from wizard import deploy
+from wizard import deploy, log
 
 def main(argv, baton):
     options, args = parse_args(argv)
-    d = deploy.Deployment.fromDir(args[0])
-    d.getLog() # force the log to be loaded, to pre-empt errors
+    d = deploy.Deployment(args[0])
+    d.log # force the log to be loaded, to pre-empt errors
     with PipeToLess():
         print_log(d, options)
 
@@ -28,16 +28,16 @@ including its history and current version."""
 
 def print_log(d, options):
     if options.reverse:
-        log = reversed(d.getLog())
+        dlog = reversed(d.log)
     else:
-        log = d.getLog()
-    for entry in log:
+        dlog = d.log
+    for entry in dlog:
         print "%s %s" % (entry.version.application.name, entry.version.version)
         print "User: %s" % entry.user
         print "Date: %s" % entry.datetime.strftime("%a %b %0d %H:%M:%S %Y %z")
         print
         info = "Unknown"
-        if isinstance(entry.source, deploy.TarballInstall):
+        if isinstance(entry.source, log.TarballInstall):
             info = "Installed with tarball at:\n%s" % \
                 prettify(entry.source.location)
         print indent(info, 4)