summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJF Ding <jian-feng.ding@intel.com>2012-02-17 22:22:48 +0800
committerJF Ding <jian-feng.ding@intel.com>2012-02-17 22:30:34 +0800
commiteed55a6afd9e322cc5ddb55559c86b2b954a911b (patch)
treec81e0b189dab33934b839e083c4c3e413e1d6b95 /tools
parent3bde59bf36c4931aa451f705132961b262eaf5e5 (diff)
downloadmic-eed55a6afd9e322cc5ddb55559c86b2b954a911b.tar.gz
mic-eed55a6afd9e322cc5ddb55559c86b2b954a911b.tar.bz2
mic-eed55a6afd9e322cc5ddb55559c86b2b954a911b.zip
development after 0.6 release
using the 0.7git version and unified style and comments for recent patches
Diffstat (limited to 'tools')
-rwxr-xr-xtools/mic12
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/mic b/tools/mic
index 4d5ee3f..4070357 100755
--- a/tools/mic
+++ b/tools/mic
@@ -131,14 +131,18 @@ class MicCmd(cmdln.Cmdln):
if (srcimager and destimager) is None:
raise errors.CreatorError("Can't convert from %s to %s" \
% (srcformat, destformat))
+
else:
- maptab = {"livecd": "iso",
- "liveusb": "usbimg",
- "loop": "img"
+ maptab = {
+ "livecd": "iso",
+ "liveusb": "usbimg",
+ "loop": "img",
}
- if destformat in maptab.keys():
+
+ if destformat in maptab:
imgname = os.path.splitext(os.path.basename(srcimg))[0]
dstname = "{0}.{1}".format(imgname, maptab[destformat])
+
if os.path.exists(dstname):
if msger.ask("Converted image %s seems existed, "
"remove and continue?" % dstname):