diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-03-26 17:27:41 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-07-21 15:07:41 +0200 |
commit | 5499e558a541a0c8740d608dc4446f64ebe774c6 (patch) | |
tree | 28fbac26740b4f2ea19a0261422deb7e46f7af65 /ishtar_common/utils.py | |
parent | 62b34d0afb55a5c5c7bc1da22f0c0d293ee3936d (diff) | |
download | Ishtar-5499e558a541a0c8740d608dc4446f64ebe774c6.tar.bz2 Ishtar-5499e558a541a0c8740d608dc4446f64ebe774c6.zip |
🐛 fix unclosed file
Diffstat (limited to 'ishtar_common/utils.py')
-rw-r--r-- | ishtar_common/utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py index ca78993c2..10dee40ca 100644 --- a/ishtar_common/utils.py +++ b/ishtar_common/utils.py @@ -2249,7 +2249,8 @@ def generate_relation_graph( png_name = tempdir + os.path.sep + "relations.png" with open(png_name, "wb") as png_file: - svg2png(open(svg_tmp_name, "rb").read(), write_to=png_file) + with open(svg_tmp_name, "rb") as svg_tmp: + svg2png(svg_tmp.read(), write_to=png_file) with open(png_name, "rb") as png_file: django_file = File(png_file) attr = "relation_bitmap_image" + suffix |