diff --git a/pySim-shell.py b/pySim-shell.py index c6454038..5b80588c 100755 --- a/pySim-shell.py +++ b/pySim-shell.py @@ -254,6 +254,13 @@ Online manual available at https://downloads.osmocom.org/docs/pysim/master/html/ if not sw_match(sw, opts.expect_sw): raise SwMatchError(sw, opts.expect_sw) + @cmd2.with_category(CUSTOM_CATEGORY) + def do_reset(self, opts): + """Reset the Card.""" + atr = self.card.reset() + self.poutput('Card ATR: %s' % i2h(atr)) + self.update_prompt() + class InterceptStderr(list): def __init__(self): self._stderr_backup = sys.stderr @@ -702,12 +709,6 @@ class PySimCommands(CommandSet): raise RuntimeError( "unable to export %i dedicated files(s)%s" % (context['ERR'], exception_str_add)) - def do_reset(self, opts): - """Reset the Card.""" - atr = self._cmd.card.reset() - self._cmd.poutput('Card ATR: %s' % i2h(atr)) - self._cmd.update_prompt() - def do_desc(self, opts): """Display human readable file description for the currently selected file""" desc = self._cmd.lchan.selected_file.desc