]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-10496: posixpath.expanduser() catchs pwd.getpwuid() error (GH-10919) (GH-10925)
authorVictor Stinner <vstinner@redhat.com>
Wed, 5 Dec 2018 16:21:37 +0000 (17:21 +0100)
committerGitHub <noreply@github.com>
Wed, 5 Dec 2018 16:21:37 +0000 (17:21 +0100)
commit31b635dbf0c7108f18bb3ce382b895374cff77fb
treebf6f9d3e94d9a6dc9f578832abd86272b5d27503
parentbfb881849f588cd2046776fb431c3045781c8214
bpo-10496: posixpath.expanduser() catchs pwd.getpwuid() error (GH-10919) (GH-10925)

* 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)
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]