mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-17 02:48:34 +03:00
pySim-shell: allow card insertion at runtime
Currently a card must be present in the reader until the user can enter pySim-shell. Removing and plugging another card is in theory already possible, but then the new card will operate on the old card and runtime state object. It might also be useful to enter pySim-shell before the card is plugged to execute some other commands for preperation before. So lets allow to "equip" pySim-shell with a card and rs object at runtime. Related: SYS#5617 Change-Id: I9cf532d9da8203065463c7201e7064de6c7ab1b5
This commit is contained in:
@@ -1329,6 +1329,11 @@ class RuntimeState(object):
|
||||
raise TypeError("Only works with BER-TLV EF")
|
||||
return self.card._scc.set_data(self.selected_file.fid, tag, data_hex, conserve=self.conserve_write)
|
||||
|
||||
def unregister_cmds(self, cmd_app=None):
|
||||
"""Unregister all file specific commands."""
|
||||
if cmd_app and self.selected_file.shell_commands:
|
||||
for c in self.selected_file.shell_commands:
|
||||
cmd_app.unregister_command_set(c)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user