raw: allow partitions without a file-system
authorArtem Bityutskiy <artem.bityutskiy@intel.com>
Fri, 15 Feb 2013 14:57:09 +0000 (16:57 +0200)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Tue, 19 Feb 2013 06:48:38 +0000 (08:48 +0200)
Do not error out if a partition does not have a mount point and file-system
type. We want MIC to create partitions without any format and without any
mount-point.

Change-Id: Ib50fecc2ffd501be8b24dac5d57324cf5de72b74
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
mic/imager/raw.py

index 72a230a..b1d28be 100644 (file)
@@ -160,9 +160,10 @@ class RawImageCreator(BaseImageCreator):
                 raise CreatorError("Failed to create disks, no --ondisk "
                                    "specified in partition line of ks file")
 
-            if not parts[i].fstype:
+            if parts[i].mountpoint and not parts[i].fstype:
                 raise CreatorError("Failed to create disks, no --fstype "
-                                    "specified in partition line of ks file")
+                                    "specified for partition with mountpoint "
+                                    "'%s' in the ks file")
 
             self._disk_names.append(disk_name)