diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-06-28 15:41:37 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-06-28 15:41:39 +0100 |
commit | 41988fec47eb196ab7195a75330a6d98de19101b (patch) | |
tree | f2d6dd24546209e3658863d0de44c1588500c11c /lib/bb/msg.py | |
parent | 5ada512d6f9cbbdf1172ff7818117c38b12225ca (diff) | |
download | bitbake-41988fec47eb196ab7195a75330a6d98de19101b.tar.gz |
msg: Avoid issues where paths have relative components
The autobuilder can end up using build/../ syntax which is an issue
if the build directory is cleaned. Avoid this by using normpath()
on the file path passed in.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/msg.py')
-rw-r--r-- | lib/bb/msg.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/msg.py b/lib/bb/msg.py index c0b344e32..2d88c4e72 100644 --- a/lib/bb/msg.py +++ b/lib/bb/msg.py @@ -280,7 +280,7 @@ def setLoggingConfig(defaultconfig, userconfigfile=None): logconfig = copy.deepcopy(defaultconfig) if userconfigfile: - with open(userconfigfile, 'r') as f: + with open(os.path.normpath(userconfigfile), 'r') as f: if userconfigfile.endswith('.yml') or userconfigfile.endswith('.yaml'): import yaml userconfig = yaml.load(f) |