Ensure file handle is not leaked in loadConfig.py, for ews and build.webkit.org Similar to https://commits.webkit.org/237299@main
Created attachment 435074 [details] Patch
Comment on attachment 435074 [details] Patch The change is clearly an improvement, but I'm curious if we actually observed the problem in practice (i.e. observed that garbage collection didn't do it quickly).
(In reply to Alexey Proskuryakov from comment #2) > Comment on attachment 435074 [details] > I'm curious if we actually observed the problem in practice. Not really. The motivation for this change was that when the unit-test fail for something, they also print following error about this closed file. This sometimes makes the unit-test failure message ugly and confusing (e.g. https://ews-build.webkit.org/#/builders/20/builds/53092/steps/12/logs/stdio). Stderr: Exception ignored in: <_io.FileIO name='Tools/CISupport/ews-build/config.json' mode='rb' closefd=True> ResourceWarning: unclosed file <_io.TextIOWrapper name='Tools/CISupport/ews-build/config.json' mode='r' encoding='UTF-8'>
Committed r280759 (240344@main): <https://commits.webkit.org/240344@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 435074 [details].
<rdar://problem/81657719>