import sys
import subprocess
-import wizard.deploy as wd
+from wizard import deploy
def prettify(loc):
return loc.replace("/afs/athena.mit.edu/contrib/scripts", "~scripts")
parser.error("too many arguments")
elif not args:
parser.error("must specify directory")
- deploy = wd.Deployment.fromDir(args[0])
- deploy.getLog() # force the log to be loaded, to pre-empt errors
+ d = deploy.Deployment.fromDir(args[0])
+ d.getLog() # force the log to be loaded, to pre-empt errors
proc = False
# This is prime candidate for refactoring. This code pipes
# stdout to less, so that you get scrolling and stuff.
try:
if options.reverse: munge = lambda x: x
else: munge = reversed
- for entry in munge(deploy.getLog()):
+ for entry in munge(d.getLog()):
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, wd.TarballInstall):
+ if isinstance(entry.source, deploy.TarballInstall):
info = "Installed with tarball at:\n%s" % \
prettify(entry.source.location)
print indent(info, 4)