diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2003-05-13 18:14:25 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2003-05-13 18:14:25 (GMT) |
commit | ac6df95d07aa3951f8bfc6febce132e09850db73 (patch) | |
tree | 5bc66133d5d093e099b622ac3cd35e216f60a389 /Tools/scripts/byteyears.py | |
parent | bf1bef820c5af6b0a9a60abe1564ac35f036fdcb (diff) | |
download | cpython-ac6df95d07aa3951f8bfc6febce132e09850db73.zip cpython-ac6df95d07aa3951f8bfc6febce132e09850db73.tar.gz cpython-ac6df95d07aa3951f8bfc6febce132e09850db73.tar.bz2 |
Fix use of 'file' as a variable name.
(I've tested the fixes, but please proofread anyway.)
Diffstat (limited to 'Tools/scripts/byteyears.py')
-rwxr-xr-x | Tools/scripts/byteyears.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Tools/scripts/byteyears.py b/Tools/scripts/byteyears.py index 2b0f9b2..9c2a974 100755 --- a/Tools/scripts/byteyears.py +++ b/Tools/scripts/byteyears.py @@ -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) |