]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/command/list.py
Fix bug where php.ini not being rewritten for MediaWiki.
[wizard.git] / wizard / command / list.py
index d96f12ed0da6ebf6f4ea787fae4cb4973e1815db..cb2f2b09ac94a08a0c2762550653d05747486d31 100644 (file)
@@ -1,5 +1,4 @@
 import logging
-import traceback
 import os.path
 
 from wizard import command, deploy
@@ -7,14 +6,18 @@ from wizard import command, deploy
 def main(argv, baton):
     options, show = parse_args(argv, baton)
     errors = 0
-    for d in deploy.parse_install_lines(show, options, True):
+    for d in deploy.parse_install_lines(show, options.versions_path, True, user=options.user):
         if isinstance(d, Exception):
             errors += 1
+            continue
         if options.exists and not os.path.exists(os.path.join(d.location, options.exists)):
             continue
-        print d.location
+        if options.url:
+            print d.url.geturl()
+        else:
+            print d.location
     if errors:
-        logging.warning("%d errors, see wizard errors for details" % errors)
+        logging.warning("%d errors, see 'wizard errors --verbose' for details" % errors)
 
 def parse_args(argv, baton):
     usage = """usage: %prog list [ARGS] [APP[-VERSION]]
@@ -34,7 +37,10 @@ Examples:
     parser = command.WizardOptionParser(usage)
     parser.add_option("-e", "--exists", dest="exists",
             help="only print deployment if FILE exists", metavar="FILE")
+    parser.add_option("--url", dest="url", action="store_true",
+            default=False, help="prints URLs of deployment instead of path")
     baton.push(parser, "versions_path")
+    baton.push(parser, "user")
     options, args = parser.parse_all(argv)
     if len(args) > 1:
         parser.error("too many arguments")