diff options
author | Brandon Squizzato <bsquizza@redhat.com> | 2018-02-12 14:45:44 -0500 |
---|---|---|
committer | Brandon Squizzato <bsquizza@redhat.com> | 2018-02-12 14:45:44 -0500 |
commit | d369123ff676615255b975beec2d7289d63a6510 (patch) | |
tree | a692c53573d828e8cd31d88ddc2d1cfb28167a26 /cmd2.py | |
parent | 4a765e16e64d0b8479921f2e36b4cb8b97db92b1 (diff) | |
download | cmd2-git-d369123ff676615255b975beec2d7289d63a6510.tar.gz |
Check if name is in self.names before removing
Diffstat (limited to 'cmd2.py')
-rwxr-xr-x | cmd2.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1590,7 +1590,8 @@ class Cmd(cmd.Cmd): # Remove any command names which are explicitly excluded from the help menu for name in self.exclude_from_help: - names.remove(name) + if name in names: + names.remove(name) cmds_doc = [] cmds_undoc = [] |