diff options
author | Guido van Rossum <guido@python.org> | 1992-03-30 11:15:26 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1992-03-30 11:15:26 (GMT) |
commit | 9a6757dadeab6077f26f3bdfda17585780468121 (patch) | |
tree | 51674557c58f1b496bcf7042f47cc2f184f05ea0 /Tools/scripts/copytime.py | |
parent | 391b8b7deed0d2f555ebc61e969b8798e9379081 (diff) | |
download | cpython-9a6757dadeab6077f26f3bdfda17585780468121.zip cpython-9a6757dadeab6077f26f3bdfda17585780468121.tar.gz cpython-9a6757dadeab6077f26f3bdfda17585780468121.tar.bz2 |
posix -> os
Diffstat (limited to 'Tools/scripts/copytime.py')
-rwxr-xr-x | Tools/scripts/copytime.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Tools/scripts/copytime.py b/Tools/scripts/copytime.py index a288c09..1d201c6 100755 --- a/Tools/scripts/copytime.py +++ b/Tools/scripts/copytime.py @@ -3,7 +3,7 @@ # Copy one file's atime and mtime to another import sys -import posix +import os from stat import ST_ATIME, ST_MTIME # Really constants 7 and 8 def main(): @@ -12,13 +12,13 @@ def main(): sys.exit(2) file1, file2 = sys.argv[1], sys.argv[2] try: - stat1 = posix.stat(file1) - except posix.error: + stat1 = os.stat(file1) + except os.error: sys.stderr.write(file1 + ': cannot stat\n') sys.exit(1) try: - posix.utime(file2, (stat1[ST_ATIME], stat1[ST_MTIME])) - except posix.error: + os.utime(file2, (stat1[ST_ATIME], stat1[ST_MTIME])) + except os.error: sys.stderr.write(file2 + ': cannot change time\n') sys.exit(2) |