diff options
author | iw0 <osmocom@heychris.eu> | 2023-06-19 10:27:04 +0200 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2023-07-09 08:12:28 +0000 |
commit | f818acd5eb669b7d28cb770434ce2b99d3b00169 (patch) | |
tree | 675435e7e47591ab9455d2f409d1f059fcbafa10 /pySim-shell.py | |
parent | f4a01472bf1a5cad38c7db1fd46666a8adfa0b96 (diff) |
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
Diffstat (limited to 'pySim-shell.py')
-rwxr-xr-x | pySim-shell.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pySim-shell.py b/pySim-shell.py index 3161844..a65e42a 100755 --- a/pySim-shell.py +++ b/pySim-shell.py @@ -215,6 +215,10 @@ class PysimApp(Cmd2Compat): if self.rs: lchan = self.rs.lchan[0] 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]: cmd_set = self.find_commandsets(cmds) if cmd_set: |