diff options
author | Gui Chen <gui.chen@intel.com> | 2011-12-27 15:07:02 +0800 |
---|---|---|
committer | Gui Chen <gui.chen@intel.com> | 2011-12-27 15:07:02 +0800 |
commit | 6475a58f9cd1636ebf349cadfcf131a5a8852191 (patch) | |
tree | b32c55e93b176cc4787ef7e83169f9d95f1130e1 /tools | |
parent | 7f074e1ccd96bc3ac188ea3fa6be732178cbea9e (diff) | |
download | mic-6475a58f9cd1636ebf349cadfcf131a5a8852191.tar.gz mic-6475a58f9cd1636ebf349cadfcf131a5a8852191.tar.bz2 mic-6475a58f9cd1636ebf349cadfcf131a5a8852191.zip |
fix convert and chroot issue caused by not existed image
Signed-off-by: Gui Chen <gui.chen@intel.com>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/mic | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -101,6 +101,8 @@ class MicCmd(cmdln.Cmdln): else: raise errors.Usage("Extra argument given") + if not os.path.exists(srcimg): + raise errors.CreatorError("Failed to find the image: %s" % srcimg) self._root_confirm() srcformat = misc.get_image_type(srcimg) @@ -143,6 +145,9 @@ class MicCmd(cmdln.Cmdln): else: raise errors.Usage("Extra argument given") + if not os.path.exists(targetimage): + raise errors.CreatorError("Failed to find the image: %s" + % targetimage) self._root_confirm() imagetype = misc.get_image_type(targetimage) |