From: Brett Cannon Date: Sat, 20 Mar 2004 21:08:17 +0000 (+0000) Subject: Fix how line endings were handled when iterating over a .pth file by stripping X-Git-Tag: v2.4a1~660 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=497331fa2ba93ee290144046754c59b3025b5eb1;p=python Fix how line endings were handled when iterating over a .pth file by stripping all whitespace at the end of the path line. --- diff --git a/Lib/site.py b/Lib/site.py index f8c000a678..682bbd5e40 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)