oe.external: handle invalid FILES_MIRRORS entries

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
This commit is contained in:
Christopher Larson
2018-10-12 22:35:51 +05:00
parent ccde5a3528
commit 226a8616f8

View File

@@ -30,7 +30,10 @@ def get_file_search_metadata(d):
entry = entry.strip()
if not entry:
continue
pathname, subst = entry.strip().split('|', 1)
try:
pathname, subst = entry.strip().split('|', 1)
except ValueError:
bb.warn('Invalid FILES_MIRRORS entry: {0}'.format(entry))
mirrors.append(('^' + re.escape(pathname), subst))
source_paths = [os.path.realpath(p)