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 4343166..088a3ba 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -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()