Browse Source

fix: close patch_file before deleting it (#15055)

Heilig Benedek 6 years ago
parent
commit
2d186cb31a
1 changed files with 1 additions and 0 deletions
  1. 1 0
      script/run-clang-format.py

+ 1 - 0
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"