summaryrefslogtreecommitdiffstats
path: root/Tools/scripts/byteyears.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-03-30 11:15:26 (GMT)
committerGuido van Rossum <guido@python.org>1992-03-30 11:15:26 (GMT)
commit9a6757dadeab6077f26f3bdfda17585780468121 (patch)
tree51674557c58f1b496bcf7042f47cc2f184f05ea0 /Tools/scripts/byteyears.py
parent391b8b7deed0d2f555ebc61e969b8798e9379081 (diff)
downloadcpython-9a6757dadeab6077f26f3bdfda17585780468121.zip
cpython-9a6757dadeab6077f26f3bdfda17585780468121.tar.gz
cpython-9a6757dadeab6077f26f3bdfda17585780468121.tar.bz2
posix -> os
Diffstat (limited to 'Tools/scripts/byteyears.py')
-rwxr-xr-xTools/scripts/byteyears.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Tools/scripts/byteyears.py b/Tools/scripts/byteyears.py
index c0aea70..c643dd7 100755
--- a/Tools/scripts/byteyears.py
+++ b/Tools/scripts/byteyears.py
@@ -6,15 +6,15 @@
#
# Options -[amc] select atime, mtime (default) or ctime as age.
-import sys, posix, time
+import sys, os, time
import string
from stat import *
# Use lstat() to stat files if it exists, else stat()
try:
- statfunc = posix.lstat
-except NameError:
- statfunc = posix.stat
+ statfunc = os.lstat
+except AttributeError:
+ statfunc = os.stat
# Parse options
if sys.argv[1] == '-m':
@@ -42,7 +42,7 @@ for file in sys.argv[1:]:
for file in sys.argv[1:]:
try:
st = statfunc(file)
- except posix.error, msg:
+ except os.error, msg:
sys.stderr.write('can\'t stat ' + `file` + ': ' + `msg` + '\n')
status = 1
st = ()