Merge pull request #507 from BoboTiG/fix-unclosed-file

Fix a ResourceWarning: unclosed file in core.py
This commit is contained in:
Ian Stapleton Cordasco
2018-08-31 17:43:47 -05:00
committed by GitHub
+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")