Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
gh-98374: Suppress ImportError for invalid query for help() command.
  • Loading branch information
corona10 committed Oct 19, 2022
commit a4d5b80b09319b377838ea85d0aeeabb6a3a88e8
6 changes: 5 additions & 1 deletion Lib/pydoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1997,7 +1997,11 @@ def __repr__(self):
_GoInteractive = object()
def __call__(self, request=_GoInteractive):
if request is not self._GoInteractive:
self.help(request)
try:
self.help(request)
except ImportError as e:
self.output.write(str(e))
self.output.write("\n")
Comment thread
corona10 marked this conversation as resolved.
Outdated
else:
self.intro()
self.interact()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Suppress ImportError for invalid query for help() command. Patch by Dong-hee
Na.