]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/command/massmigrate.py
Refactor to get rid of _package.py using __import__ magic.
[wizard.git] / wizard / command / massmigrate.py
index 1c9c5f434ae0c8d179ba47f28a6c2825c01b455c..3d034c934e238b2973ae15c12c10b00c2922f958 100644 (file)
@@ -5,11 +5,7 @@ import os.path
 import pwd
 
 import wizard
-from wizard import deploy
-from wizard import util
-from wizard import shell
-from wizard import sset
-from wizard.command import _command
+from wizard import deploy, util, shell, sset, command
 from wizard.command import migrate
 
 def main(argv, baton):
@@ -28,7 +24,7 @@ def main(argv, baton):
             d = deploy.Deployment.parse(line)
         except deploy.DeploymentParseError, deploy.NoSuchApplication:
             continue
-        name = d.getApplication().name
+        name = d.application.name
         if name != app: continue
         if d.location in seen:
             continue
@@ -77,7 +73,7 @@ This command is intended to be run as root on a server with
 the scripts AFS patch.  You may run it as an unpriviledged
 user for testing purposes, but then you MUST NOT run this on
 untrusted repositories."""
-    parser = _command.WizardOptionParser(usage)
+    parser = command.WizardOptionParser(usage)
     parser.add_option("--no-parallelize", dest="no_parallelize", action="store_true",
             default=False, help="Turn off parallelization")
     parser.add_option("--dry-run", dest="dry_run", action="store_true",
@@ -97,7 +93,7 @@ untrusted repositories."""
     return options, args
 
 def calculate_base_args(options):
-    base_args = _command.makeBaseArgs(options, dry_run="--dry-run")
+    base_args = command.makeBaseArgs(options, dry_run="--dry-run")
     if not options.debug:
         base_args.append("--quiet")
     return base_args