don't exit if parted returns non-zero
authorGui Chen <gui.chen@intel.com>
Tue, 27 Aug 2013 10:18:59 +0000 (06:18 -0400)
committerGui Chen <gui.chen@intel.com>
Tue, 27 Aug 2013 10:22:59 +0000 (06:22 -0400)
parted actually returns non-zero even if set
'boot' flag succeeded, to be compatible with
all the case, mic is better to give warning
than to exit immediately

Signed-off-by: Gui Chen <gui.chen@intel.com>
mic/utils/partitionedfs.py

index 0460f05..ac01ec1 100644 (file)
@@ -268,7 +268,7 @@ class PartitionedMount(Mount):
 
         rc, out = runner.runtool(args, catch = 3)
         out = out.strip()
-        msger.debug('"parted": exitcode:%d, output:%s' % (rc, out))
+        msger.debug("'parted': exitcode: %d, output: %s" % (rc, out))
         # We don't throw exception when return code is not 0, because
         # parted always fails to reload part table with loop devices. This
         # prevents us from distinguishing real errors based on return
@@ -351,7 +351,7 @@ class PartitionedMount(Mount):
                        flag_name, "on"]
                 exitcode, output = self.__run_parted(cmd)
                 if exitcode != 0:
-                    raise CreatorError(
+                    msger.warning(
                         "partition '%s' is marked with --active, "
                         "but flag '%s' can't be set: "
                         "exitcode: %s, output: %s"