From: Scott Murray Date: Tue, 22 Feb 2022 14:45:34 +0000 (-0500) Subject: scripts: fix file writing in convert-spdx-licenses X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~5115 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46135c87345c7189053dafbed92c754f9f328c32;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.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 68b9e2f18e5..4e194dee3ff 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)