Raise exception if fail to install mic-bootstrap
authorHuanhuan Li <huanhuanx.li@intel.com>
Thu, 27 Feb 2014 07:08:36 +0000 (15:08 +0800)
committerGui Chen <gui.chen@intel.com>
Wed, 5 Mar 2014 06:12:41 +0000 (08:12 +0200)
When installing rpm, only None means install rpm successfully,
so raise exception if not
Fixes: #1564

Change-Id: I09bbb39f68eff72a4769e9732c5ab505cdef8313

mic/bootstrap.py

index 3fd4d87..5cfa8c7 100644 (file)
@@ -140,11 +140,7 @@ class MiniBackend(object):
         # ts.run() exit codes are, hmm, "creative": None means all ok, empty 
         # list means some errors happened in the transaction and non-empty 
         # list that there were errors preventing the ts from starting...
-        if errs is None:
-            pass
-        elif len(errs) == 0:
-             msger.warning("Warning: scriptlet or other non-fatal errors occurred")
-        else:
+        if errs is not None:
              raise errors.BootstrapError("Transaction couldn't start: %s" % '\n'.join(errs))
 
     def run_pkg_script(self, pkg, prog, script, arg):