This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
ptrkrysik gerrit-no-reply at lists.osmocom.orgptrkrysik has submitted this change. ( https://gerrit.osmocom.org/c/gr-gsm/+/24083 )
Change subject: tests: Close the temp file handle in qa_burst_file_source
......................................................................
tests: Close the temp file handle in qa_burst_file_source
This fixes the following warning
./usr/lib64/python3.7/unittest/case.py:645: ResourceWarning: unclosed file <_io.BufferedWriter name='/tmp/tmpkkz_akd6'>
testMethod()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
Change-Id: I66c2be2e5bf6915e3df253b3a69f5516534e3750
---
M python/qa_burst_file_source.py
1 file changed, 2 insertions(+), 0 deletions(-)
Approvals:
ptrkrysik: Looks good to me, approved; Verified
diff --git a/python/qa_burst_file_source.py b/python/qa_burst_file_source.py
index c83c9c4..bfdcc73 100644
--- a/python/qa_burst_file_source.py
+++ b/python/qa_burst_file_source.py
@@ -51,6 +51,7 @@
0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01
]))
handle.flush();
+ handle.close();
src = grgsm.burst_file_source(temp.name);
dst = grgsm.burst_sink();
@@ -88,6 +89,7 @@
0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01
]))
handle.flush();
+ handle.close();
src = grgsm.burst_file_source(temp.name);
dst = grgsm.burst_sink();
--
To view, visit https://gerrit.osmocom.org/c/gr-gsm/+/24083
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: gr-gsm
Gerrit-Branch: master
Gerrit-Change-Id: I66c2be2e5bf6915e3df253b3a69f5516534e3750
Gerrit-Change-Number: 24083
Gerrit-PatchSet: 1
Gerrit-Owner: ptrkrysik <ptrkrysik at gmail.com>
Gerrit-Reviewer: ptrkrysik <ptrkrysik at gmail.com>
Gerrit-Reviewer: vvvelichkov <vvvelichkov at gmail.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210503/5e501465/attachment.htm>