Fix a ResourceWarning: unclosed file in core.py

This commit is contained in:
Mickaël Schoentgen
2018-08-31 16:43:37 +02:00
parent e4ee61fbc6
commit 52d823ce85
+2 -1
View File
@@ -1725,7 +1725,8 @@ def image_svg():
def resource(filename):
path = os.path.join(tmpl_dir, filename)
return open(path, "rb").read()
with open(path, "rb") as f:
return f.read()
@app.route("/xml")