diff --git a/report.py b/report.py index 044c199..58feecd 100755 --- a/report.py +++ b/report.py @@ -153,6 +153,7 @@ def camera_and_lens(informations, language, colors, temp_dir): ''' Informations about cameras and lenses used. ''' + image1, image2 = None, None with open("helpers/dictionary.json") as file: helper = json.load(file) text = _("Cameras & lenses") @@ -200,7 +201,7 @@ def camera_and_lens(informations, language, colors, temp_dir): "helpers/lenses/{}.jpg".format(top_lens.replace(" ", "_").replace("/", "_")), "{}/{}.jpg".format(temp_dir, top_lens.replace(" ", "_").replace("/", "_"))) image2 = "{}/{}.jpg".format(temp_dir, top_lens.replace(" ", "_").replace("/", "_")) - if image1 or image2: + if image1 and image2: run(["montage", image1, image2, "-geometry", "+10+0", "-quality", "94", "{}/top_camera_lens.jpg".format(temp_dir)], check=True) text += ".. image:: {}.jpg\n\t:height: 5cm\n\n".format("top_camera_lens") if len(informations['cameras']) > 1: