mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-24 14:28:32 +03:00
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
This commit is contained in:
@@ -1564,7 +1564,7 @@ def card_detect(ctype, scc):
|
|||||||
card = None
|
card = None
|
||||||
ctypes = dict([(kls.name, kls) for kls in _cards_classes])
|
ctypes = dict([(kls.name, kls) for kls in _cards_classes])
|
||||||
|
|
||||||
if ctype in ("auto", "auto_once"):
|
if ctype == "auto":
|
||||||
for kls in _cards_classes:
|
for kls in _cards_classes:
|
||||||
card = kls.autodetect(scc)
|
card = kls.autodetect(scc)
|
||||||
if card:
|
if card:
|
||||||
@@ -1576,9 +1576,6 @@ def card_detect(ctype, scc):
|
|||||||
print("Autodetection failed")
|
print("Autodetection failed")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if ctype == "auto_once":
|
|
||||||
ctype = card.name
|
|
||||||
|
|
||||||
elif ctype in ctypes:
|
elif ctype in ctypes:
|
||||||
card = ctypes[ctype](scc)
|
card = ctypes[ctype](scc)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user