filter for ValueError too in dpi logic

This commit is contained in:
Patrick Kanzler 2023-11-17 00:33:21 +01:00 committed by Patrick Kanzler
parent 8f44ae7480
commit 90c89e66f0
1 changed files with 1 additions and 1 deletions

View File

@ -463,7 +463,7 @@ class Escpos(object):
"""Printer's DPI resolution."""
try:
dpi = int(self.profile.profile_data["media"]["dpi"])
except (KeyError, TypeError):
except (KeyError, TypeError, ValueError):
# Calculate the printer's DPI from the width info of the profile.
try:
px = self.profile.profile_data["media"]["width"]["pixels"]