Skip to content

Commit

Permalink
gh-98374: Suppress ImportError for invalid query for help() command. (g…
Browse files Browse the repository at this point in the history
  • Loading branch information
corona10 authored Oct 20, 2022
1 parent 1ca6647 commit 4156b2f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Lib/pydoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1997,7 +1997,10 @@ 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(f'{e}\n')
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.

0 comments on commit 4156b2f

Please sign in to comment.