diff options
-rw-r--r-- | scripts/lib/wic/engine.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py index 42e93c3eb8..61939ad194 100644 --- a/scripts/lib/wic/engine.py +++ b/scripts/lib/wic/engine.py | |||
@@ -75,7 +75,8 @@ def find_canned_image(scripts_path, wks_file): | |||
75 | for fname in files: | 75 | for fname in files: |
76 | if fname.endswith("~") or fname.endswith("#"): | 76 | if fname.endswith("~") or fname.endswith("#"): |
77 | continue | 77 | continue |
78 | if fname.endswith(".wks") and wks_file + ".wks" == fname: | 78 | if ((fname.endswith(".wks") and wks_file + ".wks" == fname) or \ |
79 | (fname.endswith(".wks.in") and wks_file + ".wks.in" == fname)): | ||
79 | fullpath = os.path.join(canned_wks_dir, fname) | 80 | fullpath = os.path.join(canned_wks_dir, fname) |
80 | return fullpath | 81 | return fullpath |
81 | return None | 82 | return None |
@@ -92,7 +93,7 @@ def list_canned_images(scripts_path): | |||
92 | for fname in files: | 93 | for fname in files: |
93 | if fname.endswith("~") or fname.endswith("#"): | 94 | if fname.endswith("~") or fname.endswith("#"): |
94 | continue | 95 | continue |
95 | if fname.endswith(".wks"): | 96 | if fname.endswith(".wks") or fname.endswith(".wks.in"): |
96 | fullpath = os.path.join(canned_wks_dir, fname) | 97 | fullpath = os.path.join(canned_wks_dir, fname) |
97 | with open(fullpath) as wks: | 98 | with open(fullpath) as wks: |
98 | for line in wks: | 99 | for line in wks: |
@@ -101,7 +102,7 @@ def list_canned_images(scripts_path): | |||
101 | if idx != -1: | 102 | if idx != -1: |
102 | desc = line[idx + len("short-description:"):].strip() | 103 | desc = line[idx + len("short-description:"):].strip() |
103 | break | 104 | break |
104 | basename = os.path.splitext(fname)[0] | 105 | basename = fname.split('.')[0] |
105 | print(" %s\t\t%s" % (basename.ljust(30), desc)) | 106 | print(" %s\t\t%s" % (basename.ljust(30), desc)) |
106 | 107 | ||
107 | 108 | ||