filter for ValueError too in dpi logic
This commit is contained in:
parent
8f44ae7480
commit
90c89e66f0
|
@ -463,7 +463,7 @@ class Escpos(object):
|
||||||
"""Printer's DPI resolution."""
|
"""Printer's DPI resolution."""
|
||||||
try:
|
try:
|
||||||
dpi = int(self.profile.profile_data["media"]["dpi"])
|
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.
|
# Calculate the printer's DPI from the width info of the profile.
|
||||||
try:
|
try:
|
||||||
px = self.profile.profile_data["media"]["width"]["pixels"]
|
px = self.profile.profile_data["media"]["width"]["pixels"]
|
||||||
|
|
Loading…
Reference in New Issue