diff options
author | Douglas Anderson <danderson@ntia.doc.gov> | 2017-02-12 15:52:19 -0800 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2017-02-26 18:21:22 -0800 |
commit | 9e625c4821f4c63421b3d3747c0c4f358fef6c5f (patch) | |
tree | 41dedbe053417be7314cdce15d64fbbb89db4d8d /gnuradio-runtime/python/gnuradio/ctrlport/GNURadioControlPortClient.py | |
parent | e5aabcc6a4a9335f3ef8abf5f89104b626e9364d (diff) |
python3: update non-GRC components to use python2 or python3
Diffstat (limited to 'gnuradio-runtime/python/gnuradio/ctrlport/GNURadioControlPortClient.py')
-rw-r--r-- | gnuradio-runtime/python/gnuradio/ctrlport/GNURadioControlPortClient.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/GNURadioControlPortClient.py b/gnuradio-runtime/python/gnuradio/ctrlport/GNURadioControlPortClient.py index 87d2cf5658..beec500023 100644 --- a/gnuradio-runtime/python/gnuradio/ctrlport/GNURadioControlPortClient.py +++ b/gnuradio-runtime/python/gnuradio/ctrlport/GNURadioControlPortClient.py @@ -27,6 +27,8 @@ Remote Procedure Call (RPC) transports, the Apache Thrift middle-ware RPC is currently the only supported transport. """ +from __future__ import print_function +from __future__ import unicode_literals import exceptions @@ -38,7 +40,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 +115,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 +130,5 @@ class GNURadioControlPortClient(): if not blockingcallback is None: blockingcallback() else: - print("Unsupported RPC method: ", rpcmethod) + print(("Unsupported RPC method: ", rpcmethod)) raise exceptions.ValueError() |