summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-02-15 00:07:14 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-04 10:42:30 +0000
commit15442d072bb6d93bd9b941726f93262503053da5 (patch)
tree429d93ff75e9c6666a42d51cd5552d0d2a368710
parentb952076cc9f458c3d5eb03e12dc3ec316a44804c (diff)
downloadopenembedded-core-contrib-15442d072bb6d93bd9b941726f93262503053da5.tar.gz
wic: move WicError to lib/wic/__init__.py
Removed unused exceptions from error.py Moved definition of WicError to lib/wic/__init__.py Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
-rw-r--r--scripts/lib/wic/__init__.py20
-rw-r--r--scripts/lib/wic/engine.py2
-rw-r--r--scripts/lib/wic/errors.py29
-rw-r--r--scripts/lib/wic/partition.py2
-rw-r--r--scripts/lib/wic/plugin.py3
-rw-r--r--scripts/lib/wic/plugins/imager/direct.py2
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-efi.py2
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-partition.py2
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-pcbios.py2
-rw-r--r--scripts/lib/wic/plugins/source/fsimage.py2
-rw-r--r--scripts/lib/wic/plugins/source/isoimage-isohybrid.py2
-rw-r--r--scripts/lib/wic/plugins/source/rawcopy.py2
-rw-r--r--scripts/lib/wic/plugins/source/rootfs.py2
-rw-r--r--scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py2
-rw-r--r--scripts/lib/wic/utils/misc.py2
-rw-r--r--scripts/lib/wic/utils/runner.py2
-rwxr-xr-xscripts/wic2
17 files changed, 35 insertions, 45 deletions
diff --git a/scripts/lib/wic/__init__.py b/scripts/lib/wic/__init__.py
index e69de29bb2d..85876b138c7 100644
--- a/scripts/lib/wic/__init__.py
+++ b/scripts/lib/wic/__init__.py
@@ -0,0 +1,20 @@
+#!/usr/bin/env python -tt
+#
+# Copyright (c) 2007 Red Hat, Inc.
+# Copyright (c) 2011 Intel, Inc.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; version 2 of the License
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+class WicError(Exception):
+ pass
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index 38a68ed3408..c29924b781a 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -31,7 +31,7 @@
import logging
import os
-from wic.errors import WicError
+from wic import WicError
from wic.plugin import pluginmgr
from wic.utils.misc import get_bitbake_var
diff --git a/scripts/lib/wic/errors.py b/scripts/lib/wic/errors.py
deleted file mode 100644
index d1b514dd9d1..00000000000
--- a/scripts/lib/wic/errors.py
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env python -tt
-#
-# Copyright (c) 2007 Red Hat, Inc.
-# Copyright (c) 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-class WicError(Exception):
- pass
-
-class CreatorError(WicError):
- pass
-
-class Usage(WicError):
- pass
-
-class ImageError(WicError):
- pass
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index e100377933f..8e531e4dcc9 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -28,7 +28,7 @@ import logging
import os
import tempfile
-from wic.errors import WicError
+from wic import WicError
from wic.utils.misc import exec_cmd, exec_native_cmd, get_bitbake_var
from wic.plugin import pluginmgr
diff --git a/scripts/lib/wic/plugin.py b/scripts/lib/wic/plugin.py
index 0e98da5c7a3..ac55ecf5454 100644
--- a/scripts/lib/wic/plugin.py
+++ b/scripts/lib/wic/plugin.py
@@ -19,8 +19,7 @@ import os
import sys
import logging
-from wic.errors import WicError
-from wic import pluginbase
+from wic import pluginbase, WicError
from wic.utils.misc import get_bitbake_var
__ALL__ = ['PluginMgr', 'pluginmgr']
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index 5b20ca9c5ba..6d1ed8c205a 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -32,7 +32,7 @@ import uuid
from time import strftime
-from wic.errors import WicError
+from wic import WicError
from wic.filemap import sparse_copy
from wic.ksparser import KickStart, KickStartError
from wic.plugin import pluginmgr
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
index 1f018fabf46..2d793a5cb7d 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -28,7 +28,7 @@ import logging
import os
import shutil
-from wic.errors import WicError
+from wic import WicError
from wic.engine import get_custom_config
from wic.pluginbase import SourcePlugin
from wic.utils.misc import (exec_cmd, exec_native_cmd, get_bitbake_var,
diff --git a/scripts/lib/wic/plugins/source/bootimg-partition.py b/scripts/lib/wic/plugins/source/bootimg-partition.py
index e9724a63a35..373e8d8f75a 100644
--- a/scripts/lib/wic/plugins/source/bootimg-partition.py
+++ b/scripts/lib/wic/plugins/source/bootimg-partition.py
@@ -29,7 +29,7 @@ import re
from glob import glob
-from wic.errors import WicError
+from wic import WicError
from wic.pluginbase import SourcePlugin
from wic.utils.misc import exec_cmd, get_bitbake_var
diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
index c3a0e4eb421..74c75a054e2 100644
--- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
@@ -27,8 +27,8 @@
import logging
import os
+from wic import WicError
from wic.engine import get_custom_config
-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,
diff --git a/scripts/lib/wic/plugins/source/fsimage.py b/scripts/lib/wic/plugins/source/fsimage.py
index 67fc6d1b044..8fbe44d9756 100644
--- a/scripts/lib/wic/plugins/source/fsimage.py
+++ b/scripts/lib/wic/plugins/source/fsimage.py
@@ -18,7 +18,7 @@
import logging
import os
-from wic.errors import WicError
+from wic import WicError
from wic.pluginbase import SourcePlugin
from wic.utils.misc import get_bitbake_var
diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index df86acc0e0f..1ceba62be05 100644
--- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
+++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
@@ -26,7 +26,7 @@ import os
import re
import shutil
-from wic.errors import WicError
+from wic import WicError
from wic.engine import get_custom_config
from wic.pluginbase import SourcePlugin
from wic.utils.misc import exec_cmd, exec_native_cmd, get_bitbake_var
diff --git a/scripts/lib/wic/plugins/source/rawcopy.py b/scripts/lib/wic/plugins/source/rawcopy.py
index 561280977a3..12348ae35e2 100644
--- a/scripts/lib/wic/plugins/source/rawcopy.py
+++ b/scripts/lib/wic/plugins/source/rawcopy.py
@@ -18,7 +18,7 @@
import logging
import os
-from wic.errors import WicError
+from wic import WicError
from wic.pluginbase import SourcePlugin
from wic.utils.misc import exec_cmd, get_bitbake_var
from wic.filemap import sparse_copy
diff --git a/scripts/lib/wic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py
index f7ca5696043..f2e2ca8a2be 100644
--- a/scripts/lib/wic/plugins/source/rootfs.py
+++ b/scripts/lib/wic/plugins/source/rootfs.py
@@ -31,7 +31,7 @@ import shutil
from oe.path import copyhardlinktree
-from wic.errors import WicError
+from wic import WicError
from wic.pluginbase import SourcePlugin
from wic.utils.misc import get_bitbake_var, exec_cmd
diff --git a/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py b/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py
index cf0eec2fe35..94f80d07ae4 100644
--- a/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py
+++ b/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py
@@ -22,7 +22,7 @@ import logging
import os
import re
-from wic.errors import WicError
+from wic 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
diff --git a/scripts/lib/wic/utils/misc.py b/scripts/lib/wic/utils/misc.py
index 94fdab26695..4b822f0eee2 100644
--- a/scripts/lib/wic/utils/misc.py
+++ b/scripts/lib/wic/utils/misc.py
@@ -33,7 +33,7 @@ import re
from collections import defaultdict
from distutils import spawn
-from wic.errors import WicError
+from wic import WicError
from wic.utils import runner
logger = logging.getLogger('wic')
diff --git a/scripts/lib/wic/utils/runner.py b/scripts/lib/wic/utils/runner.py
index 5ede1929a34..56d7ea3adfd 100644
--- a/scripts/lib/wic/utils/runner.py
+++ b/scripts/lib/wic/utils/runner.py
@@ -19,7 +19,7 @@ import logging
import os
import subprocess
-from wic.errors import WicError
+from wic import WicError
logger = logging.getLogger('wic')
diff --git a/scripts/wic b/scripts/wic
index 97af72b1049..f32cb19b347 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -53,7 +53,7 @@ if bitbake_exe:
else:
bitbake_main = None
-from wic.errors import WicError
+from wic import WicError
from wic.utils.misc import get_bitbake_var, BB_VARS
from wic import engine
from wic import help as hlp