mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
[3.11] gh-98374: Suppress ImportError for invalid query for help() co… (gh-98472)
This commit is contained in:
parent
5f5fa4ca4b
commit
e2af980e19
2 changed files with 6 additions and 1 deletions
|
@ -1998,7 +1998,10 @@ class Helper:
|
|||
_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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue