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)
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)