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

This commit is contained in:
Dong-hee Na 2022-10-20 10:56:21 +09:00 committed by GitHub
parent 1ca6647f22
commit 4156b2fc13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -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()

View File

@ -0,0 +1,2 @@
Suppress ImportError for invalid query for help() command. Patch by Dong-hee
Na.