diff options
author | Mats Wichmann <mats@linux.com> | 2019-04-26 17:10:19 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2019-04-26 19:11:59 (GMT) |
commit | 15326cf04732bbcc5ef62c5452349a4bd029b70e (patch) | |
tree | 8a7f61381f13838164e43bcb533adf1e5efd93ee /src/engine/SCons/Platform/PlatformTests.py | |
parent | 0e84c296d686e4384c8e6f5137a7c15e51dcb167 (diff) | |
download | SCons-15326cf04732bbcc5ef62c5452349a4bd029b70e.zip SCons-15326cf04732bbcc5ef62c5452349a4bd029b70e.tar.gz SCons-15326cf04732bbcc5ef62c5452349a4bd029b70e.tar.bz2 |
[PR #3345] fix more PY3.8 fails
File closes in msvs tool
Context manager in rpm tool
Dummy compiler, assembler scripts can be called in unexpected
ways (namely by gcc tool init), which passes --version flag.
don't take exception on the getopt call.
Try again to undo my breakage of _subproc, which was failing on Win+PY27
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'src/engine/SCons/Platform/PlatformTests.py')
-rw-r--r-- | src/engine/SCons/Platform/PlatformTests.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/engine/SCons/Platform/PlatformTests.py b/src/engine/SCons/Platform/PlatformTests.py index ae070f8..c89610f 100644 --- a/src/engine/SCons/Platform/PlatformTests.py +++ b/src/engine/SCons/Platform/PlatformTests.py @@ -186,7 +186,8 @@ class TempFileMungeTestCase(unittest.TestCase): cmd = t(None, None, env, 0) # print("CMD is:%s"%cmd) - file_content = open(cmd[-1],'rb').read() + with open(cmd[-1],'rb') as f: + file_content = f.read() # print("Content is:[%s]"%file_content) # ...and restoring its setting. SCons.Action.print_actions = old_actions |