aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFathi Boudra <fathi.boudra@linaro.org>2016-05-19 16:44:59 +0300
committerFathi Boudra <fathi.boudra@linaro.org>2016-05-19 13:46:03 +0000
commitdb326d211de20e5ac31c5ab63c33a496b9f7e61b (patch)
tree2634aa5fb59499bc76cbf277b3bc07191d2d1508
parentf577f65bf94a730459fb5a1b224842ed4f14683d (diff)
downloadlinaro-image-tools-db326d211de20e5ac31c5ab63c33a496b9f7e61b.tar.gz
Improve readability
Change-Id: Ifaec71ff8b4f4659e49f19dd1344c5662c63367d Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
-rw-r--r--linaro_image_tools/media_create/boards.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/linaro_image_tools/media_create/boards.py b/linaro_image_tools/media_create/boards.py
index f00e740..276cb78 100644
--- a/linaro_image_tools/media_create/boards.py
+++ b/linaro_image_tools/media_create/boards.py
@@ -2083,8 +2083,10 @@ def _get_file_matching(regex):
If zero or more than one files match, raise a ValueError.
"""
- files = [fn for fn in glob.glob(regex)
- if not os.path.islink(fn)]
+ files = []
+ for fn in glob.glob(regex):
+ if not os.path.islink(fn):
+ files.append(fn)
if len(files) == 1:
return files[0]
elif len(files) == 0: