diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-11-11 16:08:46 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 12:21:33 -0800 |
commit | e0a40fd1d76c66e9374129536b7b10b76abad5f8 (patch) | |
tree | 9ac2a92f319f3315882a803254ca469bb445a744 /host/examples/gpio.cpp | |
parent | c8950c1e0b82ef3e849d91ffb436ac41514022a4 (diff) | |
download | uhd-e0a40fd1d76c66e9374129536b7b10b76abad5f8.tar.gz uhd-e0a40fd1d76c66e9374129536b7b10b76abad5f8.tar.bz2 uhd-e0a40fd1d76c66e9374129536b7b10b76abad5f8.zip |
devtest: Use with() statement to open files
This fixes warnings such as this during devtest:
/home/mbr0wn/src/uhddev/host/tests/devtest/uhd_test_base.py:112:
ResourceWarning: unclosed file <_io.TextIOWrapper
name='./results_x300_F457AD.log' mode='r' encoding='UTF-8'>
self.results = yaml.safe_load(open(self.results_file).read()) or {}
/path/to/uhd/host/tests/devtest/uhd_test_base.py:150:
ResourceWarning: unclosed file <_io.TextIOWrapper
name='./results_x300_F457AD.log' mode='w' encoding='UTF-8'>
yaml.dump(self.results, default_flow_style=False))
ok
Diffstat (limited to 'host/examples/gpio.cpp')
0 files changed, 0 insertions, 0 deletions