diff options
author | Walter Dörwald <walter@livinglogic.de> | 2002-06-06 09:48:13 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2002-06-06 09:48:13 (GMT) |
commit | 294bbf3a59255119cc4de3f85762ce47cd1d09e3 (patch) | |
tree | 4a3d57d008fc1cfe4c1ebdecc91e45f48d6cba35 /Lib/shutil.py | |
parent | c2009a86667a4f9837a1c8fce7ab438297e93f70 (diff) | |
download | cpython-294bbf3a59255119cc4de3f85762ce47cd1d09e3.zip cpython-294bbf3a59255119cc4de3f85762ce47cd1d09e3.tar.gz cpython-294bbf3a59255119cc4de3f85762ce47cd1d09e3.tar.bz2 |
Replace obsolete stat module constants with
equivalent attributes in a few more spots.
This closes SF patch http://www.python.org/sf/562373
Diffstat (limited to 'Lib/shutil.py')
-rw-r--r-- | Lib/shutil.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py index 4340127..3076be9 100644 --- a/Lib/shutil.py +++ b/Lib/shutil.py @@ -38,15 +38,15 @@ def copymode(src, dst): """Copy mode bits from src to dst""" if hasattr(os, 'chmod'): st = os.stat(src) - mode = stat.S_IMODE(st[stat.ST_MODE]) + mode = stat.S_IMODE(st.st_mode) os.chmod(dst, mode) def copystat(src, dst): """Copy all stat info (mode bits, atime and mtime) from src to dst""" st = os.stat(src) - mode = stat.S_IMODE(st[stat.ST_MODE]) + mode = stat.S_IMODE(st.st_mode) if hasattr(os, 'utime'): - os.utime(dst, (st[stat.ST_ATIME], st[stat.ST_MTIME])) + os.utime(dst, (st.st_atime, st.st_mtime)) if hasattr(os, 'chmod'): os.chmod(dst, mode) |