trx_toolkit/rand_burst_gen.py: fix compatibility with Python 3

Change-Id: I362881af83664f94be09d40f43dfb23d18a35136
This commit is contained in:
Vadim Yanitskiy 2019-07-24 05:34:41 +07:00
parent 06e3b4fa54
commit d206f0cc2f
1 changed files with 1 additions and 0 deletions

View File

@ -46,6 +46,7 @@ class RandBurstGen:
# 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