[OE-core] [PATCH 6/6] wic: raise WicError instead of calling logger.error

Ed Bartosh ed.bartosh at linux.intel.com
Tue Feb 21 15:23:11 UTC 2017


Replaced forgotten calls of logger.error with raising
WicError exception. Otherwise errors will be ignored.

Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
 scripts/lib/wic/plugins/source/bootimg-pcbios.py | 4 ++--
 scripts/lib/wic/utils/misc.py                    | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
index 74c75a0..bbc9f47 100644
--- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
@@ -96,8 +96,8 @@ class BootimgPcbiosPlugin(SourcePlugin):
                 logger.debug("Using custom configuration file %s "
                              "for syslinux.cfg", bootloader.configfile)
             else:
-                logger.error("configfile is specified but failed to "
-                             "get it from %s.", bootloader.configfile)
+                raise WicError("configfile is specified but failed to "
+                               "get it from %s." % bootloader.configfile)
 
         if not custom_cfg:
             # Create syslinux configuration using parameters from wks file
diff --git a/scripts/lib/wic/utils/misc.py b/scripts/lib/wic/utils/misc.py
index 216ab7b..c941112 100644
--- a/scripts/lib/wic/utils/misc.py
+++ b/scripts/lib/wic/utils/misc.py
@@ -136,7 +136,7 @@ def exec_native_cmd(cmd_and_args, native_sysroot, catch=3, pseudo=""):
         else:
             msg += "Wic failed to find a recipe to build native %s. Please "\
                    "file a bug against wic.\n" % prog
-        logger.error(msg)
+        raise WicError(msg)
 
     return ret, out
 
-- 
2.1.4




More information about the Openembedded-core mailing list