mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-17 02:48:34 +03:00
cards: get rid of method read_iccid
The method read_iccid in class CardBase should be put back to legacy/cards.py. The reason for this is that it falls in the same category like read_imsi, read_ki, etc. We should not use those old methods in future programs since we have a more modern infrastructure (lchan) now. Also pySim-shell.py is the only caller of this method now. It is not used in any other place. Related: RT#67094 Change-Id: Ied3ae6fd107992abcc1b5ea3edb0eb4bdcd2f892
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
#
|
||||
|
||||
from typing import Optional, Dict, Tuple
|
||||
from pySim.ts_102_221 import EF_DIR, EF_ICCID
|
||||
from pySim.ts_102_221 import EF_DIR
|
||||
from pySim.ts_51_011 import DF_GSM
|
||||
from pySim.transport import LinkBase
|
||||
import abc
|
||||
@@ -69,14 +69,6 @@ class CardBase:
|
||||
# callers having to do hasattr('read_aids') ahead of every call.
|
||||
return []
|
||||
|
||||
def read_iccid(self) -> Tuple[Optional[Hexstr], SwHexstr]:
|
||||
ef_iccid = EF_ICCID()
|
||||
(res, sw) = self._scc.read_binary(ef_iccid.fid)
|
||||
if sw == '9000':
|
||||
return (dec_iccid(res), sw)
|
||||
else:
|
||||
return (None, sw)
|
||||
|
||||
|
||||
class SimCardBase(CardBase):
|
||||
"""Here we only add methods for commands specified in TS 51.011, without
|
||||
|
||||
Reference in New Issue
Block a user