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:
@@ -52,7 +52,7 @@ from pySim.commands import SimCardCommands
|
||||
from pySim.transport import init_reader, ApduTracer, argparse_add_reader_args, ProactiveHandler
|
||||
from pySim.cards import card_detect, SimCardBase, UiccCardBase
|
||||
from pySim.utils import h2b, b2h, i2h, swap_nibbles, rpad, JsonEncoder, bertlv_parse_one, sw_match
|
||||
from pySim.utils import sanitize_pin_adm, tabulate_str_list, boxed_heading_str, Hexstr
|
||||
from pySim.utils import sanitize_pin_adm, tabulate_str_list, boxed_heading_str, Hexstr, dec_iccid
|
||||
from pySim.card_handler import CardHandler, CardHandlerAuto
|
||||
|
||||
from pySim.filesystem import CardDF, CardADF, CardModel, CardApplication
|
||||
@@ -240,7 +240,10 @@ class PysimApp(Cmd2Compat):
|
||||
self.register_command_set(Iso7816Commands())
|
||||
self.register_command_set(Ts102222Commands())
|
||||
self.register_command_set(PySimCommands())
|
||||
self.iccid, sw = self.card.read_iccid()
|
||||
|
||||
self.lchan.select('MF/EF.ICCID', self)
|
||||
self.iccid = dec_iccid(self.lchan.read_binary()[0])
|
||||
|
||||
self.lchan.select('MF', self)
|
||||
rc = True
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user