Fix use of 'file' as a variable name.

(I've tested the fixes, but please proofread anyway.)
This commit is contained in:
Andrew M. Kuchling 2003-05-13 18:14:25 +00:00
parent bf1bef820c
commit ac6df95d07
16 changed files with 108 additions and 107 deletions

View file

@ -34,15 +34,15 @@ status = 0 # Exit status, set to 1 on errors
# Compute max file name length
maxlen = 1
for file in sys.argv[1:]:
if len(file) > maxlen: maxlen = len(file)
for filename in sys.argv[1:]:
maxlen = max(maxlen, len(filename))
# Process each argument in turn
for file in sys.argv[1:]:
for filename in sys.argv[1:]:
try:
st = statfunc(file)
st = statfunc(filename)
except os.error, msg:
sys.stderr.write('can\'t stat ' + `file` + ': ' + `msg` + '\n')
sys.stderr.write('can\'t stat ' + `filename` + ': ' + `msg` + '\n')
status = 1
st = ()
if st:
@ -50,7 +50,7 @@ for file in sys.argv[1:]:
size = st[ST_SIZE]
age = now - anytime
byteyears = float(size) * float(age) / secs_per_year
print file.ljust(maxlen),
print filename.ljust(maxlen),
print repr(int(byteyears)).rjust(8)
sys.exit(status)