diff options
-rw-r--r-- | linaro_image_tools/media_create/boards.py | 6 |
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: |