]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/command/blacklist.py
Rewrite parametrize to use new parametrizeWithVars
[wizard.git] / wizard / command / blacklist.py
index d2c1d35e46339d07b846f61d25b88d6a5c1a75f9..a5978e53a6e3ffe56ea03769217c0ad1c5693602 100644 (file)
@@ -1,18 +1,18 @@
-import logging
 import os
-import optparse
-import sys
-import distutils.version
 
-from wizard import command, git, shell, util
+from wizard import command, deploy, shell, util
 
 def main(argv, baton):
     options, args = parse_args(argv, baton)
     reason = args[0]
-    sh = shell.Shell()
+    # Directory information not transferred via command line, so this
+    # will not error due to the changed directory.
+    shell.drop_priviledges(".", options.log_file)
     # XXX: this should be abstracted away!
     if os.path.exists(".git/WIZARD_REPO"):
-        util.chdir(sh.eval('git', 'config', 'remote.origin.url'))
+        util.chdir(shell.eval('git', 'config', 'remote.origin.url'))
+    production = deploy.ProductionCopy(".")
+    production.verify()
     open('.scripts/blacklisted', 'w').write(reason + "\n")
 
 def parse_args(argv, baton):