summaryrefslogtreecommitdiffstats
path: root/test/Java/nested-classes.py
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2018-07-24 21:44:48 (GMT)
committerMats Wichmann <mats@linux.com>2018-07-24 21:44:48 (GMT)
commitbde85d7501235a67bee32c65f83a9e4da52e3968 (patch)
treee0f510ce55a263c0cdc603a758d8e126899a399d /test/Java/nested-classes.py
parentee03bf12b40248e89ada1e501cf52b9b7cd9f867 (diff)
downloadSCons-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