Modernize stat usage
commit9d5e76a42341596583924470feebcc637fcb8ac8
authorMats Wichmann <mats@linux.com>
Fri, 8 Nov 2024 15:13:26 +0000 (8 08:13 -0700)
committerMats Wichmann <mats@linux.com>
Sun, 15 Dec 2024 20:43:39 +0000 (15 13:43 -0700)
treeec8d32faffd339e89d56194c7abc247d652b91b4
parent8e216dae1c61f4303117e59cba7bf1f3a7d1049c
Modernize stat usage

Since Python 2.2, the object returned by an os.stat() call presents
attributes matching the 10-tuple of stat values. Use these instead of
indexing into the tuple.

As usual for non-removed tests, minor tweaks made if needed -
copyright header and DefautlEnvironment() call for performance.

Signed-off-by: Mats Wichmann <mats@linux.com>
24 files changed:
CHANGES.txt
RELEASE.txt
SCons/CacheDir.py
SCons/Node/FS.py
SCons/Node/FSTests.py
SCons/Tool/install.py
site_scons/Utilities.py
test/Actions/append.py
test/Actions/pre-post.py
test/Chmod.py
test/Decider/MD5-timestamp-Repository.py
test/Decider/MD5-timestamp.py
test/Decider/timestamp.py
test/Removed/BuildDir/Old/BuildDir.py
test/Removed/BuildDir/Old/SConscript-build_dir.py
test/VariantDir/SConscript-variant_dir.py
test/VariantDir/VariantDir.py
test/VariantDir/errors.py
test/ZIP/ZIP.py
test/option/option--duplicate.py
testing/framework/TestCmd.py
testing/framework/TestCmdTests.py
testing/framework/TestCommon.py
testing/framework/TestCommonTests.py