]> granicus.if.org Git - python/commit
bpo-10496: posixpath.expanduser() catchs pwd.getpwuid() error (GH-10919)
authorVictor Stinner <vstinner@redhat.com>
Wed, 5 Dec 2018 15:49:35 +0000 (16:49 +0100)
committerGitHub <noreply@github.com>
Wed, 5 Dec 2018 15:49:35 +0000 (16:49 +0100)
commitf2f4555d8287ad217a1dba7bbd93103ad4daf3a8
treed3c3dfaee0aa56df5cdf4d9d60db7b65c3e33db4
parent398bd27967690f2c1a8cbf8d47a5613edd9cfb2a
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.
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]