diff options
author | Steven Knight <knight@baldmt.com> | 2004-06-01 04:41:58 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-06-01 04:41:58 (GMT) |
commit | ec0bcde54157490d9da10a3d0f3d58ccfaf86f22 (patch) | |
tree | 6483b18f10e11a46357d385fae5d023c25ce58b8 /src/engine/SCons/Util.py | |
parent | 01989b813c4d05c6a59212f8237287877d415798 (diff) | |
download | SCons-ec0bcde54157490d9da10a3d0f3d58ccfaf86f22.zip SCons-ec0bcde54157490d9da10a3d0f3d58ccfaf86f22.tar.gz SCons-ec0bcde54157490d9da10a3d0f3d58ccfaf86f22.tar.bz2 |
Remove dead imports and other things found by PyChecker.
Diffstat (limited to 'src/engine/SCons/Util.py')
-rw-r--r-- | src/engine/SCons/Util.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/engine/SCons/Util.py b/src/engine/SCons/Util.py index 8b7207c..636a74f 100644 --- a/src/engine/SCons/Util.py +++ b/src/engine/SCons/Util.py @@ -1052,8 +1052,8 @@ else: path = string.split(path, os.pathsep) if not is_List(reject): reject = [reject] - for dir in path: - f = os.path.join(dir, file) + for d in path: + f = os.path.join(d, file) if os.path.isfile(f): try: st = os.stat(f) @@ -1085,11 +1085,11 @@ def PrependPath(oldpath, newpath, sep = os.pathsep): orig = oldpath is_list = 1 paths = orig - if not SCons.Util.is_List(orig): + if not is_List(orig): paths = string.split(paths, sep) is_list = 0 - if SCons.Util.is_List(newpath): + if is_List(newpath): newpaths = newpath else: newpaths = string.split(newpath, sep) @@ -1128,11 +1128,11 @@ def AppendPath(oldpath, newpath, sep = os.pathsep): orig = oldpath is_list = 1 paths = orig - if not SCons.Util.is_List(orig): + if not is_List(orig): paths = string.split(paths, sep) is_list = 0 - if SCons.Util.is_List(newpath): + if is_List(newpath): newpaths = newpath else: newpaths = string.split(newpath, sep) @@ -1159,8 +1159,8 @@ def AppendPath(oldpath, newpath, sep = os.pathsep): def dir_index(directory): files = [] - for file in os.listdir(directory): - fullname = os.path.join(directory, file) + for f in os.listdir(directory): + fullname = os.path.join(directory, f) files.append(fullname) # os.listdir() isn't guaranteed to return files in any specific order, @@ -1265,12 +1265,12 @@ else: def case_sensitive_suffixes(s1, s2): return (os.path.normcase(s1) != os.path.normcase(s2)) -def adjustixes(file, pre, suf): +def adjustixes(fname, pre, suf): if pre: - path, fn = os.path.split(os.path.normpath(file)) + path, fn = os.path.split(os.path.normpath(fname)) if fn[:len(pre)] != pre: - file = os.path.join(path, pre + fn) + fname = os.path.join(path, pre + fn) # Only append a suffix if the file does not have one. - if suf and not splitext(file)[1] and file[-len(suf):] != suf: - file = file + suf - return file + if suf and not splitext(fname)[1] and fname[-len(suf):] != suf: + fname = fname + suf + return fname |