]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/command/upgrade.py
Implement prepare-new/prepare-pristine, add stub wordpress.
[wizard.git] / wizard / command / upgrade.py
index 06be3db1eb23548d64f0d57fce5d5042f364f502..0d90a562f1f977bb566ac8f975f27abd9658086f 100644 (file)
@@ -1,16 +1,15 @@
-import optparse
 import sys
 import distutils.version
 import os
 import shutil
 import logging.handlers
-import errno
 import tempfile
 import itertools
 
 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)
@@ -47,8 +46,12 @@ def main(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)
@@ -324,6 +327,7 @@ this actually works)."""
 class BlacklistedError(Error):
     #: Reason why the autoinstall was blacklisted
     reason = None
+    exitcode = errno_blacklisted
     def __init__(self, reason):
         self.reason = reason
     def __str__(self):