]> granicus.if.org Git - python/commit
#21169: fix getpass to use replace error handler on UnicodeEncodeError.
authorR David Murray <rdmurray@bitdance.com>
Mon, 14 Apr 2014 02:07:39 +0000 (22:07 -0400)
committerR David Murray <rdmurray@bitdance.com>
Mon, 14 Apr 2014 02:07:39 +0000 (22:07 -0400)
commitd5aa487cceac54fdf2b5c073157b899b3c8c9c94
treee9532a4bb5bd51eeefd53dc818b8b448cd411a44
parente544f9a27eec202d4a959dd2a255d8ce05aee663
#21169: fix getpass to use replace error handler on UnicodeEncodeError.

If the input stream encoding couldn't encode one or more of the
non-ascii characters in the prompt, it would fail, throwing a
UnicodeEncodeError.  Now if that happens we re-encoding using the
'replace' error handler.

Patch by Kushal Das.
Lib/getpass.py
Lib/test/test_getpass.py
Misc/NEWS