Ne crash plus s'il n'y a pas d'image pour l'APN et/ou l'objectif
This commit is contained in:
parent
8a1c0f0780
commit
c0a329c950
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user