diff options
author | Daniel Latypov <dlatypov@google.com> | 2020-12-02 11:08:23 -0800 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 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 <dlatypov@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Tested-by: Brendan Higgins <brendanhiggins@google.com>
Acked-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/failed-syscalls-by-pid.py')
0 files changed, 0 insertions, 0 deletions