Change in osmocom-bb[master]: trx_toolkit: get rid of Python2 specific workarounds

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/.

laforge gerrit-no-reply at lists.osmocom.org
Thu Jul 16 11:53:08 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/19291 )

Change subject: trx_toolkit: get rid of Python2 specific workarounds
......................................................................

trx_toolkit: get rid of Python2 specific workarounds

Change-Id: I16c63205c9133d964048588c25867ac7c310f951
---
M src/target/trx_toolkit/data_dump.py
M src/target/trx_toolkit/transceiver.py
2 files changed, 1 insertion(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  daniel: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved
  laforge: Looks good to me, but someone else must approve



diff --git a/src/target/trx_toolkit/data_dump.py b/src/target/trx_toolkit/data_dump.py
index fb3dca5..9a68556 100644
--- a/src/target/trx_toolkit/data_dump.py
+++ b/src/target/trx_toolkit/data_dump.py
@@ -83,8 +83,6 @@
 			self.f = capture
 
 	def __del__(self):
-		# FIXME: this causes an Exception in Python 2 (but not in Python 3)
-		# AttributeError: 'NoneType' object has no attribute 'info'
 		log.info("Closing the capture file")
 		self.f.close()
 
diff --git a/src/target/trx_toolkit/transceiver.py b/src/target/trx_toolkit/transceiver.py
index 03c60fb..9fc2948 100644
--- a/src/target/trx_toolkit/transceiver.py
+++ b/src/target/trx_toolkit/transceiver.py
@@ -326,8 +326,7 @@
 
 	def tx_queue_clear(self):
 		with self._tx_queue_lock:
-			# TODO: Python3: self._tx_queue.clear()
-			del self._tx_queue[:]
+			self._tx_queue.clear()
 
 	def clck_tick(self, fwd, fn):
 		if not self.running:

-- 
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/19291
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I16c63205c9133d964048588c25867ac7c310f951
Gerrit-Change-Number: 19291
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200716/fc4d8172/attachment.htm>


More information about the gerrit-log mailing list