X-Git-Url: https://scripts.mit.edu/gitweb/wizard.git/blobdiff_plain/c6bc1bde279253712b4c85d99f6f6b883fac4f1c..6554c6378a6e801b4fe47c50688cdae1d627bc18:/wizard/command/blacklist.py diff --git a/wizard/command/blacklist.py b/wizard/command/blacklist.py index d2c1d35..a5978e5 100644 --- a/wizard/command/blacklist.py +++ b/wizard/command/blacklist.py @@ -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):