Change in ...osmocom-bb[master]: trx_toolkit/rand_burst_gen.py: fix compatibility with Python 3

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
Tue Jul 23 22:44:33 UTC 2019


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/14918


Change subject: trx_toolkit/rand_burst_gen.py: fix compatibility with Python 3
......................................................................

trx_toolkit/rand_burst_gen.py: fix compatibility with Python 3

Change-Id: I362881af83664f94be09d40f43dfb23d18a35136
---
M src/target/trx_toolkit/rand_burst_gen.py
1 file changed, 1 insertion(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/18/14918/1

diff --git a/src/target/trx_toolkit/rand_burst_gen.py b/src/target/trx_toolkit/rand_burst_gen.py
index c449418..be4b696 100644
--- a/src/target/trx_toolkit/rand_burst_gen.py
+++ b/src/target/trx_toolkit/rand_burst_gen.py
@@ -46,6 +46,7 @@
 	# Pick a random TSC for a given burst type
 	def get_rand_tsc(self, bt):
 		tsc_list = filter(lambda seq: seq.bt == bt, list(TrainingSeqGMSK))
+		tsc_list = list(tsc_list) # In Python 3 filter() returns an iterator
 		return random.choice(tsc_list)
 
 	# Generate a normal burst

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I362881af83664f94be09d40f43dfb23d18a35136
Gerrit-Change-Number: 14918
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190723/298595c6/attachment.htm>


More information about the gerrit-log mailing list