laforge has uploaded this change for review. (
https://gerrit.osmocom.org/c/pysim/+/35595?usp=email )
Change subject: pySim-shell: Permit 'reset' command also in unqeuipped stage
......................................................................
pySim-shell: Permit 'reset' command also in unqeuipped stage
If we are not 'equipped' as we could not detect any known applications
on the card, we used to only permit the 'apdu' command. However, we
should also permit the 'reset' command, as it also is something that's
possible with ever card, even of unknown types.
Change-Id: I23199da727973d7095ac18031f49e1e8423aa287
---
M pySim-shell.py
1 file changed, 21 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/95/35595/1
diff --git a/pySim-shell.py b/pySim-shell.py
index c645403..5b80588 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -254,6 +254,13 @@
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 @@
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
--
To view, visit
https://gerrit.osmocom.org/c/pysim/+/35595?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I23199da727973d7095ac18031f49e1e8423aa287
Gerrit-Change-Number: 35595
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange