Skip to content

Commit d369123

Browse files
committed
Check if name is in self.names before removing
1 parent 4a765e1 commit d369123

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)