[cpplint] Use `with` statement to ensure file descriptor is closed
When running on macOS under python3 as part of PRESUBMIT_test.py, a ResourceWarning is printed. This is due to the `open(..).read()` idiom. Use a `with` statement to ensure the file is properly closed. Bug: none Change-Id: I5643db0b77e6896b4b86177d2c1fe8dea04b58ae Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4742422 Reviewed-by: Gavin Mak <gavinmak@google.com> Auto-Submit: Sylvain Defresne <sdefresne@chromium.org> Commit-Queue: Gavin Mak <gavinmak@google.com>changes/22/4742422/2
parent
43083529de
commit
071df9a729
Loading…
Reference in New Issue