from wizard import app, command, deploy, scripts, shell, util
kib_buffer = 1024 * 30 # 30 MiB we will always leave available
+errno_blacklisted = 64
def main(argv, baton):
options, args = parse_args(argv, baton)
d = deploy.ProductionCopy(".")
if os.path.exists(".scripts/blacklisted"):
reason = open(".scripts/blacklisted").read()
- print "-1 " + reason
- raise BlacklistedError(reason)
+ # ignore blank blacklisted files
+ if reason:
+ print reason
+ raise BlacklistedError(reason)
+ else:
+ logging.warning("Application was blacklisted, but no reason was found");
d.verify()
d.verifyTag(options.srv_path)
d.verifyGit(options.srv_path)
except deploy.WebVerificationError as e:
logging.warning("Web verification failed: rolling back")
perform_restore(d, backup)
- raise app.UpgradeVerificationFailure(e.contents)
+ raise app.UpgradeVerificationFailure()
# XXX: frob .htaccess to make site accessible
# to do this, check if .htaccess changed, first. Upgrade
# process might have frobbed it. Don't be
"-p", base_virtual_commit, input="", log=True)
sh.call("git", "checkout", user_virtual_commit, "--")
wc.prepareMerge()
- sh.call("git", "commit", "--amend", "-a", "-m", "amendment")
+ try:
+ sh.call("git", "commit", "--amend", "-a", "-m", "amendment")
+ except shell.CallError as e:
+ pass
try:
sh.call("git", "merge", next_virtual_commit)
except shell.CallError as e:
class BlacklistedError(Error):
#: Reason why the autoinstall was blacklisted
reason = None
+ exitcode = errno_blacklisted
def __init__(self, reason):
self.reason = reason
def __str__(self):