mirror of
https://github.com/python/cpython.git
synced 2025-08-24 10:45:53 +00:00
gh-98374: Suppress ImportError for invalid query for help() command. (gh-98450)
This commit is contained in:
parent
1ca6647f22
commit
4156b2fc13
2 changed files with 6 additions and 1 deletions
|
@ -1997,7 +1997,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