diff options
author | Viktor Ferenczi <viktor@ferenczi.eu> | 2018-03-10 18:37:33 +0100 |
---|---|---|
committer | Viktor Ferenczi <viktor@ferenczi.eu> | 2018-03-11 14:55:50 +0100 |
commit | 272ecddb2859e3c184886bc2d142e2e329b8ae83 (patch) | |
tree | 8f76dbf6737196fbb66a1b379e1f18437f609173 /editor/icons | |
parent | eceba5aa6a36521c878cf976845123e820d27161 (diff) |
Properly closing all files in Python code
Diffstat (limited to 'editor/icons')
-rw-r--r-- | editor/icons/SCsub | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/editor/icons/SCsub b/editor/icons/SCsub index 64992a9f90..7f94073e01 100644 --- a/editor/icons/SCsub +++ b/editor/icons/SCsub @@ -82,10 +82,9 @@ def make_editor_icons_action(target, source, env): s.write("#endif\n") + with open(dst, "w") as f: + f.write(s.getvalue()) - f = open(dst, "w") - f.write(s.getvalue()) - f.close() s.close() icons_string.close() |