aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2021-10-05 14:42:01 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2021-10-13 16:27:18 +0200
commit6477309107b3e6f45bb4bc256a1a9c6da1bdd2cb (patch)
treec8d32cab80238452d3d3e11294da9c858b36cb7f
parent913e6166d80364df309c06fe31a61495e84d3f47 (diff)
cards: remove "auto_once" from possible ctype options
The card_detect function in cards.py allows to specify the card type or use the hints "auto" and "auto_once" to trigger autodetection of the card. However, "auto_once" has no effect and is not used by any caller, so lets remove it. Change-Id: Iea726f51e5ddb43d8a4da2672552fff38e29b006
-rw-r--r--pySim/cards.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/pySim/cards.py b/pySim/cards.py
index 2f96ee1..95352ff 100644
--- a/pySim/cards.py
+++ b/pySim/cards.py
@@ -1564,7 +1564,7 @@ def card_detect(ctype, scc):
card = None
ctypes = dict([(kls.name, kls) for kls in _cards_classes])
- if ctype in ("auto", "auto_once"):
+ if ctype == "auto":
for kls in _cards_classes:
card = kls.autodetect(scc)
if card:
@@ -1576,9 +1576,6 @@ def card_detect(ctype, scc):
print("Autodetection failed")
return None
- if ctype == "auto_once":
- ctype = card.name
-
elif ctype in ctypes:
card = ctypes[ctype](scc)