From 2d186cb31a0f7cebcd454ccdab0e5af958c47e64 Mon Sep 17 00:00:00 2001 From: Heilig Benedek Date: Wed, 10 Oct 2018 15:55:25 +0200 Subject: [PATCH] fix: close patch_file before deleting it (#15055) --- script/run-clang-format.py | 1 + 1 file changed, 1 insertion(+) diff --git a/script/run-clang-format.py b/script/run-clang-format.py index dcec3de7a8..2cb17a5908 100644 --- a/script/run-clang-format.py +++ b/script/run-clang-format.py @@ -325,6 +325,7 @@ def main(): retcode = ExitStatus.DIFF if patch_file.tell() == 0: + patch_file.close() os.unlink(patch_file.name) else: print("\nTo patch these files, run:\n$ git apply {}\n"