summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJF Ding <jian-feng.ding@intel.com>2011-12-12 23:19:43 -0800
committerJF Ding <jian-feng.ding@intel.com>2011-12-12 23:19:43 -0800
commit77624cc6f8c88bf92b177e1b97670bf10b8df2d1 (patch)
treeff25366c5b7397376cd6a1587c9d10f0224369df /tools
parent6135eac304f406897604c7e6fb6a99de323aee26 (diff)
downloadmic-77624cc6f8c88bf92b177e1b97670bf10b8df2d1.tar.gz
mic-77624cc6f8c88bf92b177e1b97670bf10b8df2d1.tar.bz2
mic-77624cc6f8c88bf92b177e1b97670bf10b8df2d1.zip
more concise plugin related expressions
Diffstat (limited to 'tools')
-rwxr-xr-xtools/mic13
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/mic b/tools/mic
index 67beabe..a331a32 100755
--- a/tools/mic
+++ b/tools/mic
@@ -16,15 +16,16 @@
# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
import os, sys
-from mic import msger, creator, pluginmgr
+from mic import msger, creator
from mic.utils import cmdln, misc, errors
+from mic.plugin import pluginmgr
from mic.__version__ import VERSION
-class Mic(cmdln.Cmdln):
+class MicCmd(cmdln.Cmdln):
"""
Usage: mic SUBCOMMAND [OPTS] [ARGS...]
- Mic Image Creation Tool.
+ mic Means the Image Creation tool
Try 'mic help SUBCOMAND' for help on a specific subcommand.
${command_list}
@@ -108,7 +109,7 @@ class Mic(cmdln.Cmdln):
srcimager = None
destimager = None
- for iname, icls in pluginmgr.PluginMgr().get_plugins('imager').iteritems():
+ for iname, icls in pluginmgr.get_plugins('imager').iteritems():
if iname == srcformat and hasattr(icls, "do_unpack"):
srcimager = icls
if iname == destformat and hasattr(icls, "do_pack"):
@@ -149,7 +150,7 @@ class Mic(cmdln.Cmdln):
imagetype = "loop"
chrootclass = None
- for pname, pcls in pluginmgr.PluginMgr().get_plugins('imager').iteritems():
+ for pname, pcls in pluginmgr.get_plugins('imager').iteritems():
if pname == imagetype and hasattr(pcls, "do_chroot"):
chrootclass = pcls
break
@@ -161,7 +162,7 @@ class Mic(cmdln.Cmdln):
if __name__ == "__main__":
try:
- mic = Mic()
+ mic = MicCmd()
sys.exit(mic.main())
except KeyboardInterrupt: