]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/command/summary/__init__.py
Fix bug where php.ini not being rewritten for MediaWiki.
[wizard.git] / wizard / command / summary / __init__.py
index b2f7ccc909487d76e721a2fb480163aef5093cfc..155c22c551a279119b467f7a5154160db050eea3 100644 (file)
@@ -1,13 +1,9 @@
 import optparse
 import os
+import logging
 
-from wizard.command import _command
-
-# submodules
-import list
-import list_errors
-import version
-import count_exists
+import wizard
+from wizard import command, deploy
 
 def main(argv, baton):
     usage = """usage: %prog summary [ARGS] APPS
@@ -16,34 +12,35 @@ Scans all of the collected data from parallel-find.pl, and
 calculates interesting information about them.
 
 Its subcommands are:
-    count-exists    Counts how many autoinstalls contain a file
-    list            Prints the locations of all autoinstalls
-    list-errors     Prints all errors that occurred during parsing
-    versions        Breakdown of autoinstalls by version
+    unsupported     List unsupported versions in the wild
+    version         Breakdown of autoinstalls by version (default)
 
 Use %prog summary SUBCOMMAND --help for more information."""
-    parser = _command.WizardOptionParser(usage)
+    parser = command.WizardOptionParser(usage)
     parser.disable_interspersed_args()
     baton.push(parser, "versions_path")
     _, args = parser.parse_all(argv)
     rest_argv = args[1:]
     try:
-        command = args[0]
+        command_name = args[0]
     except IndexError:
-        command = "version"
+        command_name = "version"
     def get_command(name):
-        return globals()[name.replace("-", "_")]
+        member = name.replace("-", "_")
+        module = "wizard.command.summary." + member
+        __import__(module)
+        return getattr(wizard.command.summary, member)
     if command == "help":
         try:
             get_command(rest_argv[0]).main(['--help'], baton)
-        except KeyError:
+        except ImportError:
             parser.error("invalid action")
         except IndexError:
             parser.print_help()
             raise SystemExit(1)
     try:
-        command_module = get_command(command)
-    except AttributeError:
+        command_module = get_command(command_name)
+    except ImportError:
         parser.error("invalid action")
     command_module.main(rest_argv, baton)