summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mic/imager/loop.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/mic/imager/loop.py b/mic/imager/loop.py
index 04abd0a..dc2123d 100644
--- a/mic/imager/loop.py
+++ b/mic/imager/loop.py
@@ -20,7 +20,7 @@ import glob
import shutil
from mic import kickstart, msger
-from mic.utils.errors import CreatorError, MountError
+from mic.utils.errors import CreatorError, MountError, VdfsError
from mic.utils import misc, runner, fs_related as fs
from mic.imager.baseimager import BaseImageCreator
from mic.archive import packing, compressing
@@ -455,7 +455,10 @@ class LoopImageCreator(BaseImageCreator):
fullpathmkvdfs = "mkfs.vdfs" #find_binary_path("mkfs.vdfs")
runner.show("%s --help" % fullpathmkvdfs)
# fs.mkvdfs(mountpoint, self._outdir+"/"+item['label']+fs_suffix, vdfsopts)
- runner.show('%s %s -r %s %s' % (fullpathmkvdfs, vdfsopts, mountpoint, self._imgdir+"/"+item['label']+fs_suffix))
+ ret = runner.show('%s %s -r %s %s' % (fullpathmkvdfs, vdfsopts, mountpoint, self._imgdir+"/"+item['label']+fs_suffix))
+ if ret != 0:
+ runner.show("mkfs.vdfs return error")
+ raise VdfsError("' %s' exited with error (%d)" % (fullpathmkvdfs, ret))
runner.show('umount %s' % mountpoint)
# os.unlink(mountpoint)