diff options
author | Daniel Willmann <daniel@totalueberwachung.de> | 2020-10-19 10:35:11 +0200 |
---|---|---|
committer | Daniel Willmann <daniel@totalueberwachung.de> | 2020-10-19 10:35:11 +0200 |
commit | dd014ea3064e5a349e8b938a7ef272460c53036a (patch) | |
tree | 41e1abb99734a5d0784c5344220580be009344d8 /pySim | |
parent | 677d41bb41f5862b535ce590d649ac26ddb00b93 (diff) |
Lint fixes: false -> False, missing imports, Index list, not map iter
Change-Id: Iff4123a49c8dbcfc405612c0663d5c7d0f549748
Diffstat (limited to 'pySim')
-rw-r--r-- | pySim/transport/pcsc.py | 4 | ||||
-rw-r--r-- | pySim/utils.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/pySim/transport/pcsc.py b/pySim/transport/pcsc.py index 4775a1b..7b50869 100644 --- a/pySim/transport/pcsc.py +++ b/pySim/transport/pcsc.py @@ -24,10 +24,10 @@ from smartcard.CardConnection import CardConnection from smartcard.CardRequest import CardRequest -from smartcard.Exceptions import NoCardException, CardRequestTimeoutException +from smartcard.Exceptions import NoCardException, CardRequestTimeoutException, CardConnectionException from smartcard.System import readers -from pySim.exceptions import NoCardError +from pySim.exceptions import NoCardError, ProtocolError from pySim.transport import LinkBase from pySim.utils import h2i, i2h diff --git a/pySim/utils.py b/pySim/utils.py index c5cf480..f7d099b 100644 --- a/pySim/utils.py +++ b/pySim/utils.py @@ -249,7 +249,7 @@ def calculate_luhn(cc): """ Calculate Luhn checksum used in e.g. ICCID and IMEI """ - num = map(int, str(cc)) + num = list(map(int, str(cc))) check_digit = 10 - sum(num[-2::-2] + [sum(divmod(d * 2, 10)) for d in num[::-2]]) % 10 return 0 if check_digit == 10 else check_digit |