diff options
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 c503c42b9..52bcd3ddb 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 |