summaryrefslogtreecommitdiff
path: root/Tools/scripts/which.py
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2003-05-13 18:14:25 +0000
committerAndrew M. Kuchling <amk@amk.ca>2003-05-13 18:14:25 +0000
commitac6df95d07aa3951f8bfc6febce132e09850db73 (patch)
tree5bc66133d5d093e099b622ac3cd35e216f60a389 /Tools/scripts/which.py
parentbf1bef820c5af6b0a9a60abe1564ac35f036fdcb (diff)
downloadcpython-git-ac6df95d07aa3951f8bfc6febce132e09850db73.tar.gz
Fix use of 'file' as a variable name.
(I've tested the fixes, but please proofread anyway.)
Diffstat (limited to 'Tools/scripts/which.py')
-rwxr-xr-xTools/scripts/which.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Tools/scripts/which.py b/Tools/scripts/which.py
index 19e3203ff5..99dc35544c 100755
--- a/Tools/scripts/which.py
+++ b/Tools/scripts/which.py
@@ -25,29 +25,29 @@ if sys.argv[1:] and sys.argv[1][:2] == '-l':
for prog in sys.argv[1:]:
ident = ()
for dir in pathlist:
- file = os.path.join(dir, prog)
+ filename = os.path.join(dir, prog)
try:
- st = os.stat(file)
+ st = os.stat(filename)
except os.error:
continue
if not S_ISREG(st[ST_MODE]):
- msg(file + ': not a disk file')
+ msg(filename + ': not a disk file')
else:
mode = S_IMODE(st[ST_MODE])
if mode & 0111:
if not ident:
- print file
+ print filename
ident = st[:3]
else:
if st[:3] == ident:
s = 'same as: '
else:
s = 'also: '
- msg(s + file)
+ msg(s + filename)
else:
- msg(file + ': not executable')
+ msg(filename + ': not executable')
if longlist:
- sts = os.system('ls ' + longlist + ' ' + file)
+ sts = os.system('ls ' + longlist + ' ' + filename)
if sts: msg('"ls -l" exit status: ' + `sts`)
if not ident:
msg(prog + ': not found')