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/lib/wic/engine.py | |
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/lib/wic/engine.py')
-rw-r--r-- | scripts/lib/wic/engine.py | 18 |
1 files changed, 9 insertions, 9 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 | ||