]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.15] gh-91099: fix[imaplib]: call Exception with string instance (GH-31823) (#150811)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 3 Jun 2026 13:12:46 +0000 (15:12 +0200)
committerGitHub <noreply@github.com>
Wed, 3 Jun 2026 13:12:46 +0000 (09:12 -0400)
commit21a4ac77be597c7f8b799672e1c65276eda1c3db
tree679387beb6a708dd9a9af4e4239f554abfd2d1d7
parent0f08c550bcf26ca62ddf9bc221a461746638ceb3
[3.15] gh-91099: fix[imaplib]: call Exception with string instance (GH-31823) (#150811)

* bpo-46943: fix[imaplib]: call Exception with string instance

Adjust the behavior of 'login' to be similar to `authenticate()`,
where self.error is called with a str() instance.
(cherry picked from commit 29805f00a1b65163230d17584c30e2b955086abb)

Co-authored-by: Florian Best <spaceone@users.noreply.github.com>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Lib/imaplib.py
Lib/test/test_imaplib.py
Misc/NEWS.d/next/Library/2023-02-26-14-07-18.gh-issue-91099._QPbEL.rst [new file with mode: 0644]