diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-09-02 13:58:14 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-03 12:43:30 +0100 |
commit | 1561970e88c988cc8e8d6626749777c1bbd8123e (patch) | |
tree | c3a9fff8bf578eac140dc69a747e777e78e45ece /scripts | |
parent | e7287e5157eb8a1486b8896ae4c9a050b86562c7 (diff) | |
download | poky-1561970e88c988cc8e8d6626749777c1bbd8123e.tar.gz |
wic: fix pylint warning redefined-builtin
Renamed variables named as Python builtin functions.
(From OE-Core rev: bed98142e3e47ac2862ccf8fe3e4bdeabfc91172)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/wic/engine.py | 18 | ||||
-rw-r--r-- | scripts/lib/wic/imager/baseimager.py | 4 | ||||
-rw-r--r-- | scripts/lib/wic/imager/direct.py | 6 | ||||
-rw-r--r-- | scripts/lib/wic/plugins/source/bootimg-pcbios.py | 6 |
4 files changed, 17 insertions, 17 deletions
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py index 30c4fa38dc..d4a7be6c3a 100644 --- a/scripts/lib/wic/engine.py +++ b/scripts/lib/wic/engine.py | |||
@@ -77,11 +77,11 @@ def find_canned_image(scripts_path, wks_file): | |||
77 | 77 | ||
78 | for canned_wks_dir in layers_canned_wks_dir: | 78 | for canned_wks_dir in layers_canned_wks_dir: |
79 | for root, dirs, files in os.walk(canned_wks_dir): | 79 | for root, dirs, files in os.walk(canned_wks_dir): |
80 | for file in files: | 80 | for fname in files: |
81 | if file.endswith("~") or file.endswith("#"): | 81 | if fname.endswith("~") or fname.endswith("#"): |
82 | continue | 82 | continue |
83 | if file.endswith(".wks") and wks_file + ".wks" == file: | 83 | if fname.endswith(".wks") and wks_file + ".wks" == fname: |
84 | fullpath = os.path.join(canned_wks_dir, file) | 84 | fullpath = os.path.join(canned_wks_dir, fname) |
85 | return fullpath | 85 | return fullpath |
86 | return None | 86 | return None |
87 | 87 | ||
@@ -94,11 +94,11 @@ def list_canned_images(scripts_path): | |||
94 | 94 | ||
95 | for canned_wks_dir in layers_canned_wks_dir: | 95 | for canned_wks_dir in layers_canned_wks_dir: |
96 | for root, dirs, files in os.walk(canned_wks_dir): | 96 | for root, dirs, files in os.walk(canned_wks_dir): |
97 | for file in files: | 97 | for fname in files: |
98 | if file.endswith("~") or file.endswith("#"): | 98 | if fname.endswith("~") or fname.endswith("#"): |
99 | continue | 99 | continue |
100 | if file.endswith(".wks"): | 100 | if fname.endswith(".wks"): |
101 | fullpath = os.path.join(canned_wks_dir, file) | 101 | fullpath = os.path.join(canned_wks_dir, fname) |
102 | f = open(fullpath, "r") | 102 | f = open(fullpath, "r") |
103 | lines = f.readlines() | 103 | lines = f.readlines() |
104 | for line in lines: | 104 | for line in lines: |
@@ -107,7 +107,7 @@ def list_canned_images(scripts_path): | |||
107 | if idx != -1: | 107 | if idx != -1: |
108 | desc = line[idx + len("short-description:"):].strip() | 108 | desc = line[idx + len("short-description:"):].strip() |
109 | break | 109 | break |
110 | basename = os.path.splitext(file)[0] | 110 | basename = os.path.splitext(fname)[0] |
111 | print " %s\t\t%s" % (basename.ljust(30), desc) | 111 | print " %s\t\t%s" % (basename.ljust(30), desc) |
112 | 112 | ||
113 | 113 | ||
diff --git a/scripts/lib/wic/imager/baseimager.py b/scripts/lib/wic/imager/baseimager.py index 4abcabca4b..acbe948584 100644 --- a/scripts/lib/wic/imager/baseimager.py +++ b/scripts/lib/wic/imager/baseimager.py | |||
@@ -186,7 +186,7 @@ class BaseImageCreator(object): | |||
186 | def print_outimage_info(self): | 186 | def print_outimage_info(self): |
187 | msg = "The new image can be found here:\n" | 187 | msg = "The new image can be found here:\n" |
188 | self.outimage.sort() | 188 | self.outimage.sort() |
189 | for file in self.outimage: | 189 | for path in self.outimage: |
190 | msg += ' %s\n' % os.path.abspath(file) | 190 | msg += ' %s\n' % os.path.abspath(path) |
191 | 191 | ||
192 | msger.info(msg) | 192 | msger.info(msg) |
diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py index 74ebbe79b6..761e436db5 100644 --- a/scripts/lib/wic/imager/direct.py +++ b/scripts/lib/wic/imager/direct.py | |||
@@ -340,10 +340,10 @@ class DirectImageCreator(BaseImageCreator): | |||
340 | if p.get_rootfs() is None: | 340 | if p.get_rootfs() is None: |
341 | continue | 341 | continue |
342 | if p.mountpoint == '/': | 342 | if p.mountpoint == '/': |
343 | str = ':' | 343 | suffix = ':' |
344 | else: | 344 | else: |
345 | str = '["%s"]:' % (p.mountpoint or p.label) | 345 | suffix = '["%s"]:' % (p.mountpoint or p.label) |
346 | msg += ' ROOTFS_DIR%s%s\n' % (str.ljust(20), p.get_rootfs()) | 346 | msg += ' ROOTFS_DIR%s%s\n' % (suffix.ljust(20), p.get_rootfs()) |
347 | 347 | ||
348 | msg += ' BOOTIMG_DIR: %s\n' % self.bootimg_dir | 348 | msg += ' BOOTIMG_DIR: %s\n' % self.bootimg_dir |
349 | msg += ' KERNEL_DIR: %s\n' % self.kernel_dir | 349 | msg += ' KERNEL_DIR: %s\n' % self.kernel_dir |
diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py index 721c524970..3c2dbc9d1c 100644 --- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py +++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py | |||
@@ -127,9 +127,9 @@ class BootimgPcbiosPlugin(SourcePlugin): | |||
127 | 'prepares' the partition to be incorporated into the image. | 127 | 'prepares' the partition to be incorporated into the image. |
128 | In this case, prepare content for legacy bios boot partition. | 128 | In this case, prepare content for legacy bios boot partition. |
129 | """ | 129 | """ |
130 | def _has_syslinux(dir): | 130 | def _has_syslinux(dirname): |
131 | if dir: | 131 | if dirname: |
132 | syslinux = "%s/syslinux" % dir | 132 | syslinux = "%s/syslinux" % dirname |
133 | if os.path.exists(syslinux): | 133 | if os.path.exists(syslinux): |
134 | return True | 134 | return True |
135 | return False | 135 | return False |