diff options
author | Daniel Latypov <[email protected]> | 2020-12-02 11:08:23 -0800 |
---|---|---|
committer | Shuah Khan <[email protected]> | 2021-02-08 15:35:57 -0700 |
commit | a3ece0795b9ab234ff196e74606fdef9f463ec5a (patch) | |
tree | d6c36126a89f39af4184134c82b5afdfc3926a54 /tools/perf/scripts/python/failed-syscalls-by-pid.py | |
parent | 0b3e68076bb9a8e1b1bd448994b9c57828173d8e (diff) |
kunit: tool: use `with open()` in unit test
The use of manual open() and .close() calls seems to be an attempt to
keep the contents in scope.
But Python doesn't restrict variables like that, so we can introduce new
variables inside of a `with` and use them outside.
Do so to make the code more Pythonic.
Signed-off-by: Daniel Latypov <[email protected]>
Reviewed-by: David Gow <[email protected]>
Tested-by: Brendan Higgins <[email protected]>
Acked-by: Brendan Higgins <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/failed-syscalls-by-pid.py')
0 files changed, 0 insertions, 0 deletions