1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

Properly closing all files in Python code

This commit is contained in:
Viktor Ferenczi
2018-03-10 18:37:33 +01:00
parent eceba5aa6a
commit 272ecddb28
13 changed files with 142 additions and 112 deletions

View File

@@ -92,9 +92,11 @@ while (fname != ""):
fileread.close()
# Write
fileread = open(fname.strip(), "wb")
fileread.write(text)
fileread.close()
filewrite = open(fname.strip(), "wb")
filewrite.write(text)
filewrite.close()
# Next file
fname = files.readline()
files.close()