diff options
author | Raymond Hettinger <python@rcn.com> | 2002-06-01 19:51:15 +0000 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2002-06-01 19:51:15 +0000 |
commit | c0b1bb6d1e60ccf5bb996982376f67f2a167b8d4 (patch) | |
tree | 19fbeeda95c0f7d860f26a2a34becdc38ea39971 /Lib/filecmp.py | |
parent | e3a032af65863e1dcfa567e5bd597206852285fa (diff) | |
download | cpython-c0b1bb6d1e60ccf5bb996982376f67f2a167b8d4.tar.gz |
Replaced obsolete stat module constants with equivalent attributes
Diffstat (limited to 'Lib/filecmp.py')
-rw-r--r-- | Lib/filecmp.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/filecmp.py b/Lib/filecmp.py index f0e6d47bc3..9aee1b389b 100644 --- a/Lib/filecmp.py +++ b/Lib/filecmp.py @@ -64,9 +64,9 @@ def cmp(f1, f2, shallow=1, use_statcache=0): return outcome def _sig(st): - return (stat.S_IFMT(st[stat.ST_MODE]), - st[stat.ST_SIZE], - st[stat.ST_MTIME]) + return (stat.S_IFMT(st.st_mode), + st.st_size, + st.st_mtime) def _do_cmp(f1, f2): bufsize = BUFSIZE @@ -199,8 +199,8 @@ class dircmp: ok = 0 if ok: - a_type = stat.S_IFMT(a_stat[stat.ST_MODE]) - b_type = stat.S_IFMT(b_stat[stat.ST_MODE]) + a_type = stat.S_IFMT(a_stat.st_mode) + b_type = stat.S_IFMT(b_stat.st_mode) if a_type != b_type: self.common_funny.append(x) elif stat.S_ISDIR(a_type): |