pySim-shell: clean up method calls in do_switch_channel
The function do_switch_channel method calls methods in RuntimeLchan that should be private. There is also a code duplication in RuntimeLchan that should be cleaned up. Related: OS#6092 Change-Id: Ie5e5f45787abaaf032e1b49f51d447653cf2c996
This commit is contained in:
@@ -859,9 +859,9 @@ above the to-be-activated EF must be selected!"""
|
||||
@cmd2.with_argparser(switch_chan_parser)
|
||||
def do_switch_channel(self, opts):
|
||||
"""Switch currently active logical channel."""
|
||||
self._cmd.lchan._select_pre(self._cmd)
|
||||
self._cmd.lchan.unregister_cmds(self._cmd)
|
||||
self._cmd.lchan = self._cmd.rs.lchan[opts.chan_nr]
|
||||
self._cmd.lchan._select_post(self._cmd)
|
||||
self._cmd.lchan.register_cmds(self._cmd)
|
||||
self._cmd.update_prompt()
|
||||
|
||||
def do_status(self, opts):
|
||||
|
||||
Reference in New Issue
Block a user