Add ALT text to images

Correct static methods
Tidy up code
This commit is contained in:
Michał Gdula 2023-03-11 22:14:03 +00:00
parent e192554a0b
commit 3ee287d6e3
23 changed files with 427 additions and 430 deletions

View file

@ -4,6 +4,7 @@ Metadata formatting helpers
"""
from datetime import datetime
def human_size(value):
"""
Formats the size of a file in a human readable format
@ -276,7 +277,10 @@ def lens_specification(value):
"""
Maps the value of the lens specification to a human readable format
"""
return str(value[0] / value[1]) + 'mm - ' + str(value[2] / value[3]) + 'mm'
try:
return str(value[0] / value[1]) + 'mm - ' + str(value[2] / value[3]) + 'mm'
except Exception as err:
return None
def compression_type(value):