(self, arg=None)
| 44 | |
| 45 | |
| 46 | def _load_module(self, arg=None) -> None: |
| 47 | module = None |
| 48 | for command in self._commands: |
| 49 | self.do_back(command["module"]) |
| 50 | |
| 51 | if not hasattr(arg, 'module'): |
| 52 | module = QueryCommandSet(arg) |
| 53 | elif arg.module == 'import': |
| 54 | module = ImportCommand() |
| 55 | elif arg.module == 'config': |
| 56 | module = ConfigCommandSet(arg, section=arg.section) |
| 57 | |
| 58 | if module is not None: |
| 59 | self._commands.append({"module":arg.module if hasattr(arg,'module') else 'main', "command":module, "args": arg}) |
| 60 | self.register_command_set(module) |
| 61 | |
| 62 | def _postcmd(self, data: cmd2.plugin.PostcommandData) -> cmd2.plugin.PostcommandData: |
| 63 | self.prompt = self._default_prompt |
no test coverage detected