summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/python/gnuradio/ctrlport/GNURadioControlPortClient.py
diff options
context:
space:
mode:
authorMarcus Müller <marcus@hostalia.de>2018-08-31 23:02:22 +0200
committerMarcus Müller <marcus@hostalia.de>2018-08-31 23:02:22 +0200
commit254fe5e89403d4de1fa6663d09efdf946996aff3 (patch)
tree62877d7ac7fdedf6c397c51e22ac6f97eba97ddf /gnuradio-runtime/python/gnuradio/ctrlport/GNURadioControlPortClient.py
parent896d1c9da31963ecf5b0d90942c2af51ca998a69 (diff)
parent5ad935c3a3dd46ce2860b13e2b774e4841784616 (diff)
Merge remote-tracking branch 'origin/next' into merge_next
Diffstat (limited to 'gnuradio-runtime/python/gnuradio/ctrlport/GNURadioControlPortClient.py')
-rw-r--r--gnuradio-runtime/python/gnuradio/ctrlport/GNURadioControlPortClient.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/GNURadioControlPortClient.py b/gnuradio-runtime/python/gnuradio/ctrlport/GNURadioControlPortClient.py
index 87d2cf5658..8b811ab9d9 100644
--- a/gnuradio-runtime/python/gnuradio/ctrlport/GNURadioControlPortClient.py
+++ b/gnuradio-runtime/python/gnuradio/ctrlport/GNURadioControlPortClient.py
@@ -27,8 +27,8 @@ Remote Procedure Call (RPC) transports, the Apache Thrift middle-ware RPC
is currently the only supported transport.
"""
-
-import exceptions
+from __future__ import print_function
+from __future__ import unicode_literals
"""
GNURadioControlPortClient is the main class for creating a GNU Radio
@@ -38,7 +38,7 @@ Two constructors are provided for creating a connection to ControlPort.
"""
-class GNURadioControlPortClient():
+class GNURadioControlPortClient(object):
"""
Constructor for creating a ControlPort connection to a specified host / port
@@ -113,7 +113,7 @@ class GNURadioControlPortClient():
self.client = None
from gnuradio.ctrlport.RPCConnection import RPCMethods
- if RPCMethods.has_key(rpcmethod):
+ if rpcmethod in RPCMethods:
from gnuradio.ctrlport.RPCConnectionThrift import RPCConnectionThrift
if rpcmethod == 'thrift':
#print("making RPCConnectionThrift")
@@ -128,5 +128,5 @@ class GNURadioControlPortClient():
if not blockingcallback is None:
blockingcallback()
else:
- print("Unsupported RPC method: ", rpcmethod)
- raise exceptions.ValueError()
+ print(("Unsupported RPC method: ", rpcmethod))
+ raise ValueError()