summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-xLib/pydoc.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index a4dc910..c79ec77 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -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()