diff options
author | Mats Wichmann <mats@linux.com> | 2022-03-21 17:16:41 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2022-05-06 12:48:12 (GMT) |
commit | a20954dcb143768a4977eaa3a2c86f575683a3ca (patch) | |
tree | 13ed1ba0e1cc4bd5bcc465fa68c6bad43bbce828 | |
parent | f3a7145aa3fab14f94d0492b2ee3d46539a314b5 (diff) | |
download | SCons-a20954dcb143768a4977eaa3a2c86f575683a3ca.zip SCons-a20954dcb143768a4977eaa3a2c86f575683a3ca.tar.gz SCons-a20954dcb143768a4977eaa3a2c86f575683a3ca.tar.bz2 |
Revert to using stat.ST_MTIME in FS nodes for now
Part of the change to restore mtime checking of symlinked sources
flipped from statobj[stat.ST_MTIME] to statobj.st_mtime. These return
"the same thing" but the latter returns a float instead of an int.
This had some unexpected side effects - like failing a half-dozen
testcases. In the interest of moving the bugfix along, revert this
piece and deal with it some other time.
Signed-off-by: Mats Wichmann <mats@linux.com>
-rw-r--r-- | SCons/Node/FS.py | 2 | ||||
-rw-r--r-- | SCons/Node/FSTests.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/SCons/Node/FS.py b/SCons/Node/FS.py index a7e25b9..92972c7 100644 --- a/SCons/Node/FS.py +++ b/SCons/Node/FS.py @@ -736,7 +736,7 @@ class Base(SCons.Node.Node): st = self.stat() if st: - return st.st_mtime + return st[stat.ST_MTIME] else: return None diff --git a/SCons/Node/FSTests.py b/SCons/Node/FSTests.py index da606e2..a2400f2 100644 --- a/SCons/Node/FSTests.py +++ b/SCons/Node/FSTests.py @@ -769,7 +769,7 @@ class FileNodeInfoTestCase(_tempdirTestCase): ni.update(fff) - mtime = st.st_mtime + mtime = st[stat.ST_MTIME] assert ni.timestamp == mtime, (ni.timestamp, mtime) size = st.st_size assert ni.size == size, (ni.size, size) @@ -781,7 +781,7 @@ class FileNodeInfoTestCase(_tempdirTestCase): st = os.stat('fff') - mtime = st.st_mtime + mtime = st[stat.ST_MTIME] assert ni.timestamp != mtime, (ni.timestamp, mtime) size = st.st_size assert ni.size != size, (ni.size, size) |