mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
Bug #1566602: correct failure of posixpath unittest when $HOME ends
with a slash. (backport from rev. 52065)
This commit is contained in:
parent
ad4e11e16d
commit
9c9a9ab634
2 changed files with 4 additions and 2 deletions
|
@ -328,8 +328,7 @@ def expanduser(path):
|
||||||
except KeyError:
|
except KeyError:
|
||||||
return path
|
return path
|
||||||
userhome = pwent.pw_dir
|
userhome = pwent.pw_dir
|
||||||
if userhome.endswith('/'):
|
userhome = userhome.rstrip('/')
|
||||||
i += 1
|
|
||||||
return userhome + path[i:]
|
return userhome + path[i:]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,9 @@ Extension Modules
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Bug #1566602: correct failure of posixpath unittest when $HOME ends
|
||||||
|
with a slash.
|
||||||
|
|
||||||
- Bug #1565661: in webbrowser, split() the command for the default
|
- Bug #1565661: in webbrowser, split() the command for the default
|
||||||
GNOME browser in case it is a command with args.
|
GNOME browser in case it is a command with args.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue