mirror of
https://github.com/python/cpython.git
synced 2025-10-08 16:11:51 +00:00
Fix how line endings were handled when iterating over a .pth file by stripping
all whitespace at the end of the path line.
This commit is contained in:
parent
d54357d4e2
commit
497331fa2b
1 changed files with 1 additions and 2 deletions
|
@ -148,8 +148,7 @@ def addpackage(sitedir, name):
|
|||
if dir.startswith("import"):
|
||||
exec dir
|
||||
continue
|
||||
if dir[-1] == '\n':
|
||||
dir = dir[:-1]
|
||||
dir = dir.rstrip()
|
||||
dir, dircase = makepath(sitedir, dir)
|
||||
if not dircase in _dirs_in_sys_path and os.path.exists(dir):
|
||||
sys.path.append(dir)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue