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