diff options
| author | Raymond Hettinger <python@rcn.com> | 2002-06-01 19:51:15 (GMT) | 
|---|---|---|
| committer | Raymond Hettinger <python@rcn.com> | 2002-06-01 19:51:15 (GMT) | 
| commit | 32200aeac697fcb3f2b4528127a2fbf0a22a8f17 (patch) | |
| tree | b99f2c04d576a3699ab9a2b6dfc1fc0e31e3c734 /Lib/filecmp.py | |
| parent | 16e3c427f35589ac3b83e8c13a8ec6495ec6cfa1 (diff) | |
| download | cpython-32200aeac697fcb3f2b4528127a2fbf0a22a8f17.zip cpython-32200aeac697fcb3f2b4528127a2fbf0a22a8f17.tar.gz cpython-32200aeac697fcb3f2b4528127a2fbf0a22a8f17.tar.bz2  | |
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 f0e6d47..9aee1b3 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):  | 
