From: Scott Murray Date: Tue, 22 Feb 2022 14:45:34 +0000 (-0500) Subject: scripts: fix file writing in convert-spdx-licenses X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=46135c87345c7189053dafbed92c754f9f328c32;p=openembedded-core.git 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. Signed-off-by: Scott Murray Signed-off-by: Richard Purdie --- 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): if orig != line: modified = True new_file.write(line) + new_file.close() if modified: shutil.copymode(fn, abs_path) os.remove(fn)