]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/command/blacklist.py
Change to production directory before running certain commands.
[wizard.git] / wizard / command / blacklist.py
index 0d16be24ea067773be56149c61979f8d6e0dc9e1..e90fa36e15e7002a34477b6499664abcb100c8f4 100644 (file)
@@ -8,9 +8,7 @@ def main(argv, baton):
     # 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(shell.eval('git', 'config', 'remote.origin.url'))
+    util.chdir_to_production()
     production = deploy.ProductionCopy(".")
     production.verify()
     open(production.blacklisted_file, 'w').write(reason + "\n")