mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-31904: posixpath.expanduser() handles None user home on VxWorks (GH-23530)
This commit is contained in:
parent
96a09df644
commit
75dabfe7a8
2 changed files with 5 additions and 0 deletions
|
@ -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'/'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue