diff options
Diffstat (limited to 'gnuradio-runtime/python/gnuradio/ctrlport/GNURadioControlPortClient.py')
-rw-r--r-- | gnuradio-runtime/python/gnuradio/ctrlport/GNURadioControlPortClient.py | 12 |
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() |