Kaydet (Commit) 497331fa authored tarafından Brett Cannon's avatar Brett Cannon

Fix how line endings were handled when iterating over a .pth file by stripping

all whitespace at the end of the path line.
üst d54357d4
...@@ -148,8 +148,7 @@ def addpackage(sitedir, name): ...@@ -148,8 +148,7 @@ def addpackage(sitedir, name):
if dir.startswith("import"): if dir.startswith("import"):
exec dir exec dir
continue continue
if dir[-1] == '\n': dir = dir.rstrip()
dir = dir[:-1]
dir, dircase = makepath(sitedir, dir) dir, dircase = makepath(sitedir, dir)
if not dircase in _dirs_in_sys_path and os.path.exists(dir): if not dircase in _dirs_in_sys_path and os.path.exists(dir):
sys.path.append(dir) sys.path.append(dir)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment