summaryrefslogtreecommitdiffstats
path: root/Tools/scripts/byteyears.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/scripts/byteyears.py')
-rwxr-xr-xTools/scripts/byteyears.py12
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)