]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-102541: Fix Helper.help("mod") for non-existent mod (#105934)
authorKirill Podoprigora <kirill.bast9@mail.ru>
Sat, 1 Jul 2023 22:46:06 +0000 (01:46 +0300)
committerGitHub <noreply@github.com>
Sat, 1 Jul 2023 22:46:06 +0000 (18:46 -0400)
commit0530f4f64629ff97f3feb7524da0833b9535e8b6
treed09678bc0a0c06f6b20640d5372ae89dbd396059
parent46d77610fc77088bceac720a13d9f2df3a50f29e
gh-102541: Fix Helper.help("mod") for non-existent mod (#105934)

If the output arg to Helper() is a stream rather than the default None, which means 'page to stdout', the ImportError from pydoc.resolve is currently not caught in pydoc.doc. The same error is caught when output is None.
---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Lib/pydoc.py
Lib/test/test_pydoc.py
Misc/NEWS.d/next/Library/2023-07-01-16-40-54.gh-issue-102541.C1ahtk.rst [new file with mode: 0644]