pySim-shell: fix reset command
The reset command resets the card using the card object. This unfortunately leaves the RuntimeState uninformed about the event. However, the RuntimeState class also has a reset method that resets the card and the RuntimeState. Let's use this reset method. Also fix this method so that it ensures that the SCP is also no longer present. Related: OS#6092 Change-Id: I1ad29c9e7ce7d80bebc92fa173ed7a44ee4c2998
This commit is contained in:
@@ -265,10 +265,8 @@ Online manual available at https://downloads.osmocom.org/docs/pysim/master/html/
|
||||
@cmd2.with_category(CUSTOM_CATEGORY)
|
||||
def do_reset(self, opts):
|
||||
"""Reset the Card."""
|
||||
atr = self.card.reset()
|
||||
if self.lchan and self.lchan.scc.scp:
|
||||
self.lchan.scc.scp = None
|
||||
self.poutput('Card ATR: %s' % i2h(atr))
|
||||
atr = self.rs.reset(self)
|
||||
self.poutput('Card ATR: %s' % atr)
|
||||
self.update_prompt()
|
||||
|
||||
class InterceptStderr(list):
|
||||
|
||||
Reference in New Issue
Block a user