diff --git a/src/vorta/utils.py b/src/vorta/utils.py index fe065b51..4bb37a9b 100644 --- a/src/vorta/utils.py +++ b/src/vorta/utils.py @@ -102,7 +102,12 @@ def pretty_bytes(size): while size >= power: size /= power n += 1 - return f'{round(size, 1)} {Dic_powerN[n]}B' + try: + unit = Dic_powerN[n] + return f'{round(size, 1)} {unit}B' + except KeyError as e: + logger.error(e) + return "NaN" def get_asset(path):