diff options
Diffstat (limited to 'pySim')
-rw-r--r-- | pySim/transport/serial.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pySim/transport/serial.py b/pySim/transport/serial.py index b841b3e..7785b4a 100644 --- a/pySim/transport/serial.py +++ b/pySim/transport/serial.py @@ -52,7 +52,8 @@ class SerialSimLink(LinkBase): self._atr = None def __del__(self): - self._sl.close() + if (hasattr(self, "_sl")): + self._sl.close() def wait_for_card(self, timeout=None, newcardonly=False): # Direct try |