summaryrefslogtreecommitdiff
path: root/core/make_binders.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/make_binders.py')
-rw-r--r--core/make_binders.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/core/make_binders.py b/core/make_binders.py
index 1e581f8ce3..6a7602cd5d 100644
--- a/core/make_binders.py
+++ b/core/make_binders.py
@@ -265,10 +265,8 @@ def run(target, source, env):
else:
text += t
- f = open(target[0].path, "w")
- f.write(text)
- f.close()
+ with open(target[0].path, "w") as f:
+ f.write(text)
- f = open(target[1].path, "w")
- f.write(text_ext)
- f.close()
+ with open(target[1].path, "w") as f:
+ f.write(text_ext)