add default value to get call
This commit is contained in:
parent
f87f224601
commit
a828d8b9ef
@ -573,7 +573,7 @@ class Escpos(object):
|
|||||||
def _hw_barcode(
|
def _hw_barcode(
|
||||||
self,
|
self,
|
||||||
code,
|
code,
|
||||||
bc,
|
bc: str,
|
||||||
height: int = 64,
|
height: int = 64,
|
||||||
width: int = 3,
|
width: int = 3,
|
||||||
pos: str = "BELOW",
|
pos: str = "BELOW",
|
||||||
@ -660,7 +660,7 @@ class Escpos(object):
|
|||||||
:py:exc:`~escpos.exceptions.BarcodeCodeError`
|
:py:exc:`~escpos.exceptions.BarcodeCodeError`
|
||||||
"""
|
"""
|
||||||
# If function_type is specified, otherwise use guessing.
|
# If function_type is specified, otherwise use guessing.
|
||||||
ft_guess = [ft for ft in ["A", "B"] if bc in BARCODE_TYPES.get(ft)]
|
ft_guess = [ft for ft in ["A", "B"] if bc in BARCODE_TYPES.get(ft, {"": b""})]
|
||||||
ft_guess = ft_guess or [None]
|
ft_guess = ft_guess or [None]
|
||||||
function_type = function_type or ft_guess[0]
|
function_type = function_type or ft_guess[0]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user