diff options
author | Gui Chen <gui.chen@intel.com> | 2012-08-14 21:52:35 +0800 |
---|---|---|
committer | Gui Chen <gui.chen@intel.com> | 2012-08-14 21:52:35 +0800 |
commit | 95a988298d7eb5c2649588903fc76da16404d103 (patch) | |
tree | 18a790953b16c080fae53f8492f1048ff3e71f87 /plugins/imager/raw_plugin.py | |
parent | e5f08ce0a286bf1f25c07b6b84f4de414c9bd87d (diff) | |
download | mic-95a988298d7eb5c2649588903fc76da16404d103.tar.gz mic-95a988298d7eb5c2649588903fc76da16404d103.tar.bz2 mic-95a988298d7eb5c2649588903fc76da16404d103.zip |
better handling to check arguments before cmd running
Signed-off-by: Gui Chen <gui.chen@inte .com>
Diffstat (limited to 'plugins/imager/raw_plugin.py')
-rw-r--r-- | plugins/imager/raw_plugin.py | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/plugins/imager/raw_plugin.py b/plugins/imager/raw_plugin.py index 47f6512..89c1f76 100644 --- a/plugins/imager/raw_plugin.py +++ b/plugins/imager/raw_plugin.py @@ -48,18 +48,9 @@ class RawPlugin(ImagerPlugin): ${cmd_option_list} """ - if not args: - raise errors.Usage("need one argument as the path of ks file") - - if len(args) != 1: - raise errors.Usage("Extra arguments given") - creatoropts = configmgr.create ksconf = args[0] - if not os.path.exists(ksconf): - raise errors.CreatorError("Can't find the file: %s" % ksconf) - recording_pkgs = [] if len(creatoropts['record_pkgs']) > 0: recording_pkgs = creatoropts['record_pkgs'] |