mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-27 07:48:33 +03:00
pySim-shell: Unregister profile commands during equip
This avoids error messages about re-registering 'AddlShellCommands' commandsets during 'equip()' in the bulk_script command. Change-Id: I893bb5ae95f5c6e4c2be2d133754e427bc92a33d
This commit is contained in:
@@ -215,6 +215,10 @@ class PysimApp(Cmd2Compat):
|
|||||||
if self.rs:
|
if self.rs:
|
||||||
lchan = self.rs.lchan[0]
|
lchan = self.rs.lchan[0]
|
||||||
lchan.unregister_cmds(self)
|
lchan.unregister_cmds(self)
|
||||||
|
if self.rs.profile:
|
||||||
|
for cmd_set in self.rs.profile.shell_cmdsets:
|
||||||
|
self.unregister_command_set(cmd_set)
|
||||||
|
|
||||||
for cmds in [Iso7816Commands, Ts102222Commands, PySimCommands]:
|
for cmds in [Iso7816Commands, Ts102222Commands, PySimCommands]:
|
||||||
cmd_set = self.find_commandsets(cmds)
|
cmd_set = self.find_commandsets(cmds)
|
||||||
if cmd_set:
|
if cmd_set:
|
||||||
|
|||||||
Reference in New Issue
Block a user