Skip to content

Commit c77c240

Browse files
committed
specifying is not none on coditions
1 parent 97396ff commit c77c240

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd2/cmd2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3157,11 +3157,11 @@ def do_help(self, args: argparse.Namespace) -> None:
31573157
self.poutput(completer.format_help(tokens), end='')
31583158

31593159
# If there is a help func delegate to do_help
3160-
elif help_func:
3160+
elif help_func is not None:
31613161
super().do_help(args.command)
31623162

31633163
# If there's no help_func __doc__ then format and output it
3164-
elif func and func.__doc__:
3164+
elif func is not None and func.__doc__ is not None:
31653165
self.poutput(pydoc.getdoc(func))
31663166

31673167
# If there is no help information then print an error

0 commit comments

Comments
 (0)