Skip to content

Commit 3da3522

Browse files
committed
fix: rename argument to listen_timeout to avoid clash with pyserial argument
1 parent ca9f5f9 commit 3da3522

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/desfire/devices/pn532.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ class PN532UARTDevice(Device):
3131
Wrapper around a pyserial based connection to a PN532 device.
3232
"""
3333

34-
def __init__(self, port: str, timeout: float = 1, **kwargs):
34+
def __init__(self, port: str, listen_timeout: float = 1, **kwargs):
3535
"""
3636
Initializes a device connected to a PN532 device over UART.
3737
3838
Args:
3939
port (str): The port to connect to, e.g. "/dev/ttyS0" or "COM1".
40-
timeout (float): The timeout for passive target listening in seconds.
40+
listen_timeout (float): The timeout for passive target listening in seconds.
4141
4242
Keyword Args:
4343
All keyword arguments are passed to the pyserial.Serial constructor.
@@ -50,7 +50,7 @@ def __init__(self, port: str, timeout: float = 1, **kwargs):
5050
# read out firmware version, primary purpose is checking if connection was successful
5151
self.ic, self.ver, self.rev, self.support = self.firmware_version()
5252
self._sam_configuration()
53-
self._listen_for_passive_target(timeout=timeout)
53+
self._listen_for_passive_target(timeout=listen_timeout)
5454

5555
def _wakeup(self) -> None:
5656
"""Send a special command to wake up PN532"""

0 commit comments

Comments
 (0)