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

fixeria gerrit-no-reply at lists.osmocom.org
Thu Jul 16 06:58:47 UTC 2020


fixeria has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/91/19291/1

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-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200716/a786dcac/attachment.htm>


More information about the gerrit-log mailing list