diff options
author | JF Ding <jian-feng.ding@intel.com> | 2012-02-17 22:22:48 +0800 |
---|---|---|
committer | JF Ding <jian-feng.ding@intel.com> | 2012-02-17 22:30:34 +0800 |
commit | eed55a6afd9e322cc5ddb55559c86b2b954a911b (patch) | |
tree | c81e0b189dab33934b839e083c4c3e413e1d6b95 /tools | |
parent | 3bde59bf36c4931aa451f705132961b262eaf5e5 (diff) | |
download | mic-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-x | tools/mic | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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): |