summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/engine.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/wic/engine.py')
-rw-r--r--scripts/lib/wic/engine.py18
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