mirror of https://github.com/python/cpython
bpo-31904: posixpath.expanduser() handles None user home on VxWorks (GH-23530)
This commit is contained in:
parent
96a09df644
commit
75dabfe7a8
|
@ -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.
|
Loading…
Reference in New Issue