diff options
author | Mats Wichmann <mats@linux.com> | 2018-07-24 21:44:48 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2018-07-24 21:44:48 (GMT) |
commit | bde85d7501235a67bee32c65f83a9e4da52e3968 (patch) | |
tree | e0f510ce55a263c0cdc603a758d8e126899a399d /test/Java/nested-classes.py | |
parent | ee03bf12b40248e89ada1e501cf52b9b7cd9f867 (diff) | |
download | SCons-bde85d7501235a67bee32c65f83a9e4da52e3968.zip SCons-bde85d7501235a67bee32c65f83a9e4da52e3968.tar.gz SCons-bde85d7501235a67bee32c65f83a9e4da52e3968.tar.bz2 |
Fix py3 ResourceWarning in TestCmd
class TestCmd method read() uses a shortcut to return data from
a file, "return open(...).read()". Python 3 warns this is a
resource leak because the file has no chance to be closed with
the open being in the return statement. Split into two lines
and use a context manager (with statement).
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'test/Java/nested-classes.py')
0 files changed, 0 insertions, 0 deletions