wic: raise WicError instead of ImageError and CreatorError

There is no need to raise special exceptions. Raising
WicError should be enough.

(From OE-Core rev: b952076cc9f458c3d5eb03e12dc3ec316a44804c)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ed Bartosh authored and Richard Purdie committed 2017-03-04 23:18:17 +00:00
1 parent 8da175607c
commit af17aa91b3
4 files changed
+9 -9

No files matched your search

@@ -28,7 +28,7 @@ import logging
import os
from wic.engine import get_custom_config
from wic.errors import ImageError, WicError
from wic.errors import WicError
from wic.utils import runner
from wic.pluginbase import SourcePlugin
from wic.utils.misc import (exec_cmd, exec_native_cmd,
@@ -71,7 +71,7 @@ class BootimgPcbiosPlugin(SourcePlugin):
rcode = runner.show(['dd', 'if=%s' % mbrfile,
'of=%s' % full_path, 'conv=notrunc'])
if rcode != 0:
raise ImageError("Unable to set MBR to %s" % full_path)
raise WicError("Unable to set MBR to %s" % full_path)
@classmethod
def do_configure_partition(cls, part, source_params, creator, cr_workdir,
@@ -22,7 +22,7 @@ import logging
import os
import re
from wic.errors import ImageError, WicError
from wic.errors import WicError
from wic.utils import runner
from wic.utils.misc import get_bitbake_var, exec_cmd, exec_native_cmd
from wic.pluginbase import SourcePlugin
@@ -210,4 +210,4 @@ class RootfsPlugin(SourcePlugin):
ret_code = runner.show(['dd', 'if=%s' % mbrfile, 'of=%s' % full_path, 'conv=notrunc'])
if ret_code != 0:
raise ImageError("Unable to set MBR to %s" % full_path)
raise WicError("Unable to set MBR to %s" % full_path)