Remove the temporary dir 'srcmnt'
authorShuangquan Zhou <shuangquan.zhou@intel.com>
Tue, 20 Sep 2011 02:41:59 +0000 (10:41 +0800)
committerShuangquan Zhou <shuangquan.zhou@intel.com>
Tue, 20 Sep 2011 02:41:59 +0000 (10:41 +0800)
plugins/imager/raw_plugin.py

index b76b318..a1f1988 100644 (file)
@@ -197,7 +197,7 @@ class RawPlugin(ImagerPlugin):
         msger.info("`dd` image ...")
         rc = runner.show(args)
         srcloop.cleanup()
-        shutil.rmtree(srcmnt, ignore_errors = True)
+        shutil.rmtree(os.path.dirname(srcmnt), ignore_errors = True)
 
         if rc != 0:
             raise errors.CreatorError("Failed to dd")