]> scripts.mit.edu Git - wizard.git/commitdiff
Make migration work again, improve error messages.
authorEdward Z. Yang <ezyang@mit.edu>
Thu, 13 Aug 2009 02:43:42 +0000 (22:43 -0400)
committerEdward Z. Yang <ezyang@mit.edu>
Thu, 13 Aug 2009 02:43:42 +0000 (22:43 -0400)
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
wizard/command/migrate.py
wizard/deploy.py

index 7979a6c831fbb2ed866e9a04f7ea4c09e354bbfd..8c531674f9f0375711137e49fb0d87ddab9741dd 100644 (file)
@@ -34,7 +34,7 @@ def main(argv, baton):
         logging.info("# create .scripts/version containing \"%s-%s-scripts\"" % (deployment.application.name, deployment.version))
         logging.info("mv .scripts-version .scripts/old-version")
 
-def parse_args(argv):
+def parse_args(argv, baton):
     usage = """usage: %prog migrate [ARGS] DIR
 
 Migrates a directory to our Git-based autoinstall format.
index 1d16991bf6951c5a4f2ce774b941b4a0225ff733..60351f6fcdfe392756fdae3242c5b25687ace52c 100644 (file)
@@ -393,6 +393,8 @@ class NoRepositoryError(Error):
     app = None
     def __init__(self, app):
         self.app = app
+    def __str__(self):
+        return """Could not find Git repository for '%s'.  If you would like to use a local version, try specifying --srv-path or WIZARD_SRV_PATH.""" % self.app
 
 # If you want, you can wrap this up into a registry and access things
 # through that, but it's not really necessary