[PATCH] Check if version is actually a file
Frede Braendstrup <[email protected]>
| Newsgroups | org.yoctoproject.lists.poky |
|---|---|
| Message-ID | <[email protected]> |
Recipetool incorrectly made the assumption that version is always a file, but when it's a directory, the call to open fails Signed-off-by: Frede Braendstrup <[email protected]> --- scripts/lib/recipetool/create_buildsys.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/lib/recipetool/create_buildsys.py b/scripts/lib/recipetool/create_buildsys.py index ec9d510e23..0a08fc64ca 100644 --- a/scripts/lib/recipetool/create_buildsys.py +++ b/scripts/lib/recipetool/create_buildsys.py @@ -808,6 +808,8 @@ class VersionFileRecipeHandler(RecipeHandler): version = None for fileitem in filelist: linecount = 0 + if not os.path.isfile(fileitem): + continue with open(fileitem, 'r', errors='surrogateescape') as f: for line in f: line = line.rstrip().strip('"\'') -- 2.47.2