p.strip(os.sep) can't have possibly worked. It would have stripped both

leading and trailing '/' characters on Unix systems.
This commit is contained in:
Skip Montanaro 2003-05-06 20:59:57 +00:00
parent 22e00c42c0
commit 9f5178abb7
1 changed files with 2 additions and 4 deletions

View File

@ -59,8 +59,7 @@ def find_library_file(compiler, libname, std_dirs, paths):
dirname = os.path.dirname(result)
for p in std_dirs:
# Ensure path doesn't end with path separator
if p.endswith(os.sep):
p = p.strip(os.sep)
p = p.rstrip(os.sep)
if p == dirname:
return [ ]
@ -68,8 +67,7 @@ def find_library_file(compiler, libname, std_dirs, paths):
# so we have to figure out which one.
for p in paths:
# Ensure path doesn't end with path separator
if p.endswith(os.sep):
p = p.strip(os.sep)
p = p.rstrip(os.sep)
if p == dirname:
return [p]
else: