diff options
Diffstat (limited to 'cmd2')
-rw-r--r-- | cmd2/cmd2.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index c933db99..3f1696cf 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -458,7 +458,8 @@ class Cmd(cmd.Cmd): except Exception: for attrib in installed_attributes: delattr(self, attrib) - self._installed_command_sets.remove(cmdset) + if cmdset in self._installed_command_sets: + self._installed_command_sets.remove(cmdset) raise def _install_command_function(self, command: str, command_wrapper: Callable, context=''): |