diff options
author | Andrej Rode <mail@andrejro.de> | 2018-06-23 19:01:34 +0200 |
---|---|---|
committer | Andrej Rode <mail@andrejro.de> | 2018-06-23 21:26:32 +0200 |
commit | c40c0f3243711bbf25afdd0147d45f2e96b91c06 (patch) | |
tree | 7e739772ddc68f54d318a0fa2d1afde4afcdd429 /gr-blocks/python | |
parent | 5e07e65fe9350a51cd45f8f21cfa6bf144e42e1c (diff) |
python: Py3k compat
Diffstat (limited to 'gr-blocks/python')
-rw-r--r-- | gr-blocks/python/blocks/qa_socket_pdu.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gr-blocks/python/blocks/qa_socket_pdu.py b/gr-blocks/python/blocks/qa_socket_pdu.py index 2e033491d3..961dc914ea 100644 --- a/gr-blocks/python/blocks/qa_socket_pdu.py +++ b/gr-blocks/python/blocks/qa_socket_pdu.py @@ -105,7 +105,7 @@ class qa_socket_pdu (gr_unittest.TestCase): # Test that the TCP server can stream PDUs <= the MTU size. port = str(random.Random().randint(0, 30000) + 10000) mtu = 10000 - srcdata = tuple([x % 256 for x in xrange(mtu)]) + srcdata = tuple(x % 256 for x in range(mtu)) data = pmt.init_u8vector(srcdata.__len__(), srcdata) pdu_msg = pmt.cons(pmt.PMT_NIL, data) @@ -125,7 +125,7 @@ class qa_socket_pdu (gr_unittest.TestCase): received = self.pdu_sink.get_message(0) received_data = pmt.cdr(received) msg_data = [] - for i in xrange(mtu): + for i in range(mtu): msg_data.append(pmt.u8vector_ref(received_data, i)) self.assertEqual(srcdata, tuple(msg_data)) |