summaryrefslogtreecommitdiff
path: root/cmd2.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2018-02-12 16:27:33 -0500
committerGitHub <noreply@github.com>2018-02-12 16:27:33 -0500
commit97b9912e5f2ed7b635e6433ed38fd7e4dc35fb52 (patch)
treea692c53573d828e8cd31d88ddc2d1cfb28167a26 /cmd2.py
parent4a765e16e64d0b8479921f2e36b4cb8b97db92b1 (diff)
parentd369123ff676615255b975beec2d7289d63a6510 (diff)
downloadcmd2-git-97b9912e5f2ed7b635e6433ed38fd7e4dc35fb52.tar.gz
Merge pull request #272 from bsquizz/master
Check if name is in self.get_names() before removing
Diffstat (limited to 'cmd2.py')
-rwxr-xr-xcmd2.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd2.py b/cmd2.py
index 4f077b35..1c2daf7b 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -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 = []