diff options
author | Brett Cannon <bcannon@gmail.com> | 2004-03-20 21:08:17 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2004-03-20 21:08:17 (GMT) |
commit | 497331fa2ba93ee290144046754c59b3025b5eb1 (patch) | |
tree | 8865db442c53e13b6c9bf7c1f14bb113fa605825 /Lib | |
parent | d54357d4e2921f109212ebf8640653882994d568 (diff) | |
download | cpython-497331fa2ba93ee290144046754c59b3025b5eb1.zip cpython-497331fa2ba93ee290144046754c59b3025b5eb1.tar.gz cpython-497331fa2ba93ee290144046754c59b3025b5eb1.tar.bz2 |
Fix how line endings were handled when iterating over a .pth file by stripping
all whitespace at the end of the path line.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/site.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/site.py b/Lib/site.py index f8c000a..682bbd5 100644 --- a/Lib/site.py +++ b/Lib/site.py @@ -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) |