diff options
author | Scott Murray <scott.murray@konsulko.com> | 2022-02-22 09:45:34 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-22 15:24:51 +0000 |
commit | 3c7c2fa055849517dd6bf1b671d56d484130c8f2 (patch) | |
tree | 2d3bfb7c81b49fdb9c8d0410fa0f41e28af619ef /scripts/contrib | |
parent | d03235b2c2ef0a639810be591bd26ccbda544129 (diff) | |
download | poky-3c7c2fa055849517dd6bf1b671d56d484130c8f2.tar.gz |
scripts: fix file writing in convert-spdx-licenses
The convert-spdx-licenses.py script needs the same file closing
fix as was made to convert-variable-renames to ensure modified
file contents get flushed out.
(From OE-Core rev: 46135c87345c7189053dafbed92c754f9f328c32)
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/contrib')
-rwxr-xr-x | scripts/contrib/convert-spdx-licenses.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/contrib/convert-spdx-licenses.py b/scripts/contrib/convert-spdx-licenses.py index 68b9e2f18e..4e194dee3f 100755 --- a/scripts/contrib/convert-spdx-licenses.py +++ b/scripts/contrib/convert-spdx-licenses.py | |||
@@ -114,6 +114,7 @@ def processfile(fn): | |||
114 | if orig != line: | 114 | if orig != line: |
115 | modified = True | 115 | modified = True |
116 | new_file.write(line) | 116 | new_file.write(line) |
117 | new_file.close() | ||
117 | if modified: | 118 | if modified: |
118 | shutil.copymode(fn, abs_path) | 119 | shutil.copymode(fn, abs_path) |
119 | os.remove(fn) | 120 | os.remove(fn) |