]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/command/restore.py
Convert ad hoc shell calls to singleton instance; fix upgrade bug.
[wizard.git] / wizard / command / restore.py
index 060ab7860ac862ed21647bb2e0394e95e274cbe6..eae157f3b63beebc9444c8195c7abdd4a39f1594 100644 (file)
@@ -38,12 +38,11 @@ def main(argv, baton):
     d.verify()
     d.verifyConfigured()
     tag = "%s-%s" % (d.application.name, version)
-    sh = shell.Shell()
     try:
-        sh.call("git", "rev-parse", tag)
+        shell.call("git", "rev-parse", tag)
     except shell.CallError:
         raise Exception("Tag %s doesn't exist in repository" % tag)
-    sh.call("git", "reset", "-q", "--hard", tag)
+    shell.call("git", "reset", "-q", "--hard", tag)
     d.restore(backup, options)
 
 def parse_args(argv, baton):