Skip to content

Commit 97b9912

Browse files
authored
Merge pull request #272 from bsquizz/master
Check if name is in self.get_names() before removing
2 parents 4a765e1 + d369123 commit 97b9912

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

cmd2.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1590,7 +1590,8 @@ def _help_menu(self):
15901590

15911591
# Remove any command names which are explicitly excluded from the help menu
15921592
for name in self.exclude_from_help:
1593-
names.remove(name)
1593+
if name in names:
1594+
names.remove(name)
15941595

15951596
cmds_doc = []
15961597
cmds_undoc = []

0 commit comments

Comments
 (0)