diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-09-02 13:58:13 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-02 23:46:51 +0100 |
commit | 3644b9f5ca25dfc61d4f5eda0f073c8a879b492b (patch) | |
tree | d7cf7cfdb2e98ca65b9d11c5fdf1c72a8b002c5e /scripts/lib | |
parent | 41e319730cdd9c320ae4d855df7aaff6f1679aaf (diff) | |
download | openembedded-core-3644b9f5ca25dfc61d4f5eda0f073c8a879b492b.tar.gz openembedded-core-3644b9f5ca25dfc61d4f5eda0f073c8a879b492b.tar.bz2 openembedded-core-3644b9f5ca25dfc61d4f5eda0f073c8a879b492b.zip |
wic: fix pylint warning unused-variable
Removed or reworked code with unused variables.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r-- | scripts/lib/wic/engine.py | 4 | ||||
-rw-r--r-- | scripts/lib/wic/imager/baseimager.py | 4 | ||||
-rw-r--r-- | scripts/lib/wic/imager/direct.py | 2 | ||||
-rw-r--r-- | scripts/lib/wic/plugin.py | 7 | ||||
-rw-r--r-- | scripts/lib/wic/plugins/source/bootimg-efi.py | 6 |
5 files changed, 5 insertions, 18 deletions
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py index a034841a7a..30c4fa38dc 100644 --- a/scripts/lib/wic/engine.py +++ b/scripts/lib/wic/engine.py @@ -43,9 +43,7 @@ def verify_build_env(): Returns True if it is, false otherwise """ - try: - builddir = os.environ["BUILDDIR"] - except KeyError: + if not os.environ.get("BUILDDIR"): print "BUILDDIR not found, exiting. (Did you forget to source oe-init-build-env?)" sys.exit(1) diff --git a/scripts/lib/wic/imager/baseimager.py b/scripts/lib/wic/imager/baseimager.py index 67a2d0116b..4abcabca4b 100644 --- a/scripts/lib/wic/imager/baseimager.py +++ b/scripts/lib/wic/imager/baseimager.py @@ -132,9 +132,9 @@ class BaseImageCreator(object): os.makedirs(self.workdir) self.__builddir = tempfile.mkdtemp(dir=self.workdir, prefix="imgcreate-") - except OSError, (err, msg): + except OSError as err: raise CreatorError("Failed create build directory in %s: %s" % - (self.tmpdir, msg)) + (self.tmpdir, err)) def __setup_tmpdir(self): if not self.enabletmpfs: diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py index d68fd2a8c5..74ebbe79b6 100644 --- a/scripts/lib/wic/imager/direct.py +++ b/scripts/lib/wic/imager/direct.py @@ -327,7 +327,7 @@ class DirectImageCreator(BaseImageCreator): parts = self._get_parts() - for disk_name, disk in self.__image.disks.items(): + for disk_name in self.__image.disks: extension = "direct" + {"gzip": ".gz", "bzip2": ".bz2", "xz": ".xz", diff --git a/scripts/lib/wic/plugin.py b/scripts/lib/wic/plugin.py index e901f807ad..7244989d86 100644 --- a/scripts/lib/wic/plugin.py +++ b/scripts/lib/wic/plugin.py @@ -124,12 +124,7 @@ class PluginMgr(object): self.append_dirs(plugins_dir) - plugins = [] - - for _source_name, klass in self.get_plugins('source').iteritems(): - plugins.append(_source_name) - - return plugins + return self.get_plugins('source') def get_source_plugin_methods(self, source_name, methods): diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py index 49d5c8ae82..b48cc835d6 100644 --- a/scripts/lib/wic/plugins/source/bootimg-efi.py +++ b/scripts/lib/wic/plugins/source/bootimg-efi.py @@ -45,12 +45,6 @@ class BootimgEFIPlugin(SourcePlugin): """ Create loader-specific (grub-efi) config """ - splash = os.path.join(cr_workdir, "/EFI/boot/splash.jpg") - if os.path.exists(splash): - splashline = "menu background splash.jpg" - else: - splashline = "" - options = cr.ks.handler.bootloader.appendLine grubefi_conf = "" |