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
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)