mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-28 00:08:36 +03:00
pySim-shell: fix reset command
The API of the lchan object has changed. It no longer features the reset method used by the pySim-shell reset command. Let's fix this by using the reset method of the card object. Change-Id: I55511d1edb97e8fa014724598ec173dd47fe25c1
This commit is contained in:
@@ -50,7 +50,7 @@ from pySim.exceptions import *
|
|||||||
from pySim.commands import SimCardCommands
|
from pySim.commands import SimCardCommands
|
||||||
from pySim.transport import init_reader, ApduTracer, argparse_add_reader_args, ProactiveHandler
|
from pySim.transport import init_reader, ApduTracer, argparse_add_reader_args, ProactiveHandler
|
||||||
from pySim.cards import card_detect, SimCard
|
from pySim.cards import card_detect, SimCard
|
||||||
from pySim.utils import h2b, swap_nibbles, rpad, b2h, JsonEncoder, bertlv_parse_one, sw_match
|
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
|
||||||
from pySim.card_handler import CardHandler, CardHandlerAuto
|
from pySim.card_handler import CardHandler, CardHandlerAuto
|
||||||
|
|
||||||
@@ -736,8 +736,8 @@ class PySimCommands(CommandSet):
|
|||||||
|
|
||||||
def do_reset(self, opts):
|
def do_reset(self, opts):
|
||||||
"""Reset the Card."""
|
"""Reset the Card."""
|
||||||
atr = self._cmd.lchan.reset(self._cmd)
|
atr = self._cmd.card.reset()
|
||||||
self._cmd.poutput('Card ATR: %s' % atr)
|
self._cmd.poutput('Card ATR: %s' % i2h(atr))
|
||||||
self._cmd.update_prompt()
|
self._cmd.update_prompt()
|
||||||
|
|
||||||
def do_desc(self, opts):
|
def do_desc(self, opts):
|
||||||
|
|||||||
Reference in New Issue
Block a user