[OE-core] [PATCH 06/11] wic: move errors module

Ed Bartosh ed.bartosh at linux.intel.com
Wed Feb 15 08:38:29 UTC 2017


Moved from lib/wic/utils/ to lib/wic as this is a core module.

Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
 scripts/lib/wic/{utils => }/errors.py               | 0
 scripts/lib/wic/plugin.py                           | 4 ++--
 scripts/lib/wic/plugins/imager/direct.py            | 2 +-
 scripts/lib/wic/plugins/source/bootimg-pcbios.py    | 2 +-
 scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py | 2 +-
 scripts/wic                                         | 3 +--
 6 files changed, 6 insertions(+), 7 deletions(-)
 rename scripts/lib/wic/{utils => }/errors.py (100%)

diff --git a/scripts/lib/wic/utils/errors.py b/scripts/lib/wic/errors.py
similarity index 100%
rename from scripts/lib/wic/utils/errors.py
rename to scripts/lib/wic/errors.py
diff --git a/scripts/lib/wic/plugin.py b/scripts/lib/wic/plugin.py
index 70d3377..31311ad 100644
--- a/scripts/lib/wic/plugin.py
+++ b/scripts/lib/wic/plugin.py
@@ -19,8 +19,8 @@ import os
 import sys
 import logging
 
+from wic.errors import CreatorError
 from wic import pluginbase
-from wic.utils import errors
 from wic.utils.misc import get_bitbake_var
 
 __ALL__ = ['PluginMgr', 'pluginmgr']
@@ -110,7 +110,7 @@ class PluginMgr():
         """ the return value is dict of name:class pairs """
 
         if ptype not in PLUGIN_TYPES:
-            raise errors.CreatorError('%s is not valid plugin type' % ptype)
+            raise CreatorError('%s is not valid plugin type' % ptype)
 
         plugins_dir = self._build_plugin_dir_list(self.plugin_dir, ptype)
 
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index 2e2d26a..e51c8be 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -33,11 +33,11 @@ import uuid
 
 from time import strftime
 
+from wic.errors import ImageError
 from wic.filemap import sparse_copy
 from wic.ksparser import KickStart, KickStartError
 from wic.plugin import pluginmgr
 from wic.pluginbase import ImagerPlugin
-from wic.utils.errors import ImageError
 from wic.utils.misc import get_bitbake_var, exec_cmd, exec_native_cmd
 
 logger = logging.getLogger('wic')
diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
index 590d3d6..8f53fa2 100644
--- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
@@ -29,8 +29,8 @@ import os
 import sys
 
 from wic.engine import get_custom_config
+from wic.errors import ImageError
 from wic.utils import runner
-from wic.utils.errors import ImageError
 from wic.pluginbase import SourcePlugin
 from wic.utils.misc import (exec_cmd, exec_native_cmd,
                             get_bitbake_var, BOOTDD_EXTRA_SPACE)
diff --git a/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py b/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py
index ed5fbdf..850aa5a 100644
--- a/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py
+++ b/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py
@@ -23,9 +23,9 @@ import os
 import re
 import sys
 
+from wic.errors import ImageError
 from wic.utils import runner
 from wic.utils.misc import get_bitbake_var, exec_cmd, exec_native_cmd
-from wic.utils.errors import ImageError
 from wic.pluginbase import SourcePlugin
 
 logger = logging.getLogger('wic')
diff --git a/scripts/wic b/scripts/wic
index f3e93da..b12c743 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -51,8 +51,8 @@ if bitbake_exe:
 else:
     bitbake_main = None
 
+from wic.errors import WicError
 from wic.utils.misc import get_bitbake_var, BB_VARS
-from wic.utils.errors import WicError
 from wic import engine
 from wic import help as hlp
 
@@ -337,4 +337,3 @@ if __name__ == "__main__":
     except WicError as err:
         logger.error(err)
         sys.exit(1)
-
-- 
2.1.4




More information about the Openembedded-core mailing list