8000 gh-98374: Suppress ImportError for invalid query for help() command. by corona10 · Pull Request #98448 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-98374: Suppress ImportError for invalid query for help() command. #98448

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
gh-98374: Suppress ImportError for invalid query for help() command.
  • Loading branch information
corona10 committed Oct 19, 2022 8000
commit b2e4188c3cc8f511350741e45ba0abd4b8f61465
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")
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