]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-10496: posixpath.expanduser() catchs pwd.getpwuid() error (GH-10919)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 5 Dec 2018 16:07:57 +0000 (08:07 -0800)
committerGitHub <noreply@github.com>
Wed, 5 Dec 2018 16:07:57 +0000 (08:07 -0800)
commit983d1ab0e6f4280f954bcba87db76e11131f1c33
tree5b68e9e644f3319c98f79183ca18c6f72548d342
parent2d594f857865a4719876ac545ddfd62f474522cd
bpo-10496: posixpath.expanduser() catchs pwd.getpwuid() error (GH-10919)

* posixpath.expanduser() now returns the input path unchanged if
  the HOME environment variable is not set and pwd.getpwuid() raises
  KeyError (the current user identifier doesn't exist in the password
  database).
* Add test_no_home_directory() to test_site.
(cherry picked from commit f2f4555d8287ad217a1dba7bbd93103ad4daf3a8)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
Lib/posixpath.py
Lib/test/test_posixpath.py
Lib/test/test_site.py
Misc/NEWS.d/next/Library/2018-12-05-13-37-39.bpo-10496.VH-1Lp.rst [new file with mode: 0644]