From 9e625c4821f4c63421b3d3747c0c4f358fef6c5f Mon Sep 17 00:00:00 2001
From: Douglas Anderson <danderson@ntia.doc.gov>
Date: Sun, 12 Feb 2017 15:52:19 -0800
Subject: python3: update non-GRC components to use python2 or python3

---
 gr-blocks/python/blocks/qa_cpp_py_binding.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

(limited to 'gr-blocks/python/blocks/qa_cpp_py_binding.py')

diff --git a/gr-blocks/python/blocks/qa_cpp_py_binding.py b/gr-blocks/python/blocks/qa_cpp_py_binding.py
index 23a5c9b826..f15bfddb29 100644
--- a/gr-blocks/python/blocks/qa_cpp_py_binding.py
+++ b/gr-blocks/python/blocks/qa_cpp_py_binding.py
@@ -24,6 +24,7 @@
 # This program tests mixed python and c++ ctrlport exports in a single app
 #
 
+
 import sys, time, random, numpy, re
 from gnuradio import gr, gr_unittest, blocks
 
@@ -37,7 +38,7 @@ def get1():
 def get2():
     return "failure"
 
-class inc_class:
+class inc_class(object):
     def __init__(self):
         self.val = 1
     def pp(self):
@@ -131,7 +132,7 @@ class test_cpp_py_binding(gr_unittest.TestCase):
         self.assertComplexTuplesAlmostEqual(val, rval, 5)
 
     def test_002(self):
-        data = range(1,9)
+        data = list(range(1,9))
 
         self.src = blocks.vector_source_c(data)
         self.p1 = blocks.ctrlport_probe_c("aaa","C++ exported variable")
@@ -163,7 +164,7 @@ class test_cpp_py_binding(gr_unittest.TestCase):
 
         # Get all exported knobs
         ret = radio.getKnobs([probe_name + "::bbb"])
-        for name in ret.keys():
+        for name in list(ret.keys()):
             result = ret[name].value
             self.assertEqual(result, expected_result)
 
-- 
cgit v1.2.3