Browse Source
bpo-31904: posixpath.expanduser() handles None user home on VxWorks (GH-23530)
pull/23826/head
pxinwr
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
5 additions and
0 deletions
-
Lib/posixpath.py
-
Misc/NEWS.d/next/Library/2020-11-27-18-09-59.bpo-31904.g8k43d.rst
|
|
|
@ -262,6 +262,9 @@ def expanduser(path): |
|
|
|
# password database, return the path unchanged |
|
|
|
return path |
|
|
|
userhome = pwent.pw_dir |
|
|
|
# if no user home, return the path unchanged on VxWorks |
|
|
|
if userhome is None and sys.platform == "vxworks": |
|
|
|
return path |
|
|
|
if isinstance(path, bytes): |
|
|
|
userhome = os.fsencode(userhome) |
|
|
|
root = b'/' |
|
|
|
|
|
|
|
@ -0,0 +1,2 @@ |
|
|
|
:func:`posixpath.expanduser` returns the input *path* unchanged if |
|
|
|
user home directory is None on VxWorks. |