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 --- gnuradio-runtime/python/gnuradio/ctrlport/RPCConnection.py | 1 + 1 file changed, 1 insertion(+) (limited to 'gnuradio-runtime/python/gnuradio/ctrlport/RPCConnection.py') diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/RPCConnection.py b/gnuradio-runtime/python/gnuradio/ctrlport/RPCConnection.py index 1b129534c9..b85c827f72 100644 --- a/gnuradio-runtime/python/gnuradio/ctrlport/RPCConnection.py +++ b/gnuradio-runtime/python/gnuradio/ctrlport/RPCConnection.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals # # Copyright 2015 Free Software Foundation, Inc. # -- cgit v1.2.3 From e1fa3db39fcf38f1fefed4b3f6cc5f7b8d788933 Mon Sep 17 00:00:00 2001 From: Martin Braun <martin.braun@ettus.com> Date: Sat, 14 Jul 2018 14:44:42 -0700 Subject: ctrlport: Remove superfluous 'import exceptions' It's not needed, not even with Python 2.7. It will fail with Python 3, though. --- .../gnuradio/ctrlport/GNURadioControlPortClient.py | 4 +--- .../python/gnuradio/ctrlport/RPCConnection.py | 22 ++++++++++------------ 2 files changed, 11 insertions(+), 15 deletions(-) (limited to 'gnuradio-runtime/python/gnuradio/ctrlport/RPCConnection.py') diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/GNURadioControlPortClient.py b/gnuradio-runtime/python/gnuradio/ctrlport/GNURadioControlPortClient.py index beec500023..8b811ab9d9 100644 --- a/gnuradio-runtime/python/gnuradio/ctrlport/GNURadioControlPortClient.py +++ b/gnuradio-runtime/python/gnuradio/ctrlport/GNURadioControlPortClient.py @@ -30,8 +30,6 @@ is currently the only supported transport. from __future__ import print_function from __future__ import unicode_literals -import exceptions - """ GNURadioControlPortClient is the main class for creating a GNU Radio ControlPort client application for all transports. @@ -131,4 +129,4 @@ class GNURadioControlPortClient(object): blockingcallback() else: print(("Unsupported RPC method: ", rpcmethod)) - raise exceptions.ValueError() + raise ValueError() diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/RPCConnection.py b/gnuradio-runtime/python/gnuradio/ctrlport/RPCConnection.py index b85c827f72..0f3f27710f 100644 --- a/gnuradio-runtime/python/gnuradio/ctrlport/RPCConnection.py +++ b/gnuradio-runtime/python/gnuradio/ctrlport/RPCConnection.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals # # Copyright 2015 Free Software Foundation, Inc. # @@ -18,9 +17,6 @@ from __future__ import unicode_literals # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # - -import exceptions - """ RPCMethods is a dictionary listing RPC transports currently supported by this client. @@ -31,6 +27,8 @@ Args: options: result of command argument parsing (optparse.Values) """ +from __future__ import unicode_literals + RPCMethods = {'thrift': 'Apache Thrift', #'ice': 'Zeroc ICE' } @@ -95,25 +93,25 @@ class RPCConnection(object): return self.port def newConnection(self, host=None, port=None): - raise exceptions.NotImplementedError() + raise NotImplementedError() def properties(self, *args): - raise exceptions.NotImplementedError() + raise NotImplementedError() def getKnobs(self, *args): - raise exceptions.NotImplementedError() + raise NotImplementedError() def getRe(self,*args): - raise exceptions.NotImplementedError() + raise NotImplementedError() def postMessage(self,*args): - raise exceptions.NotImplementedError() + raise NotImplementedError() def setKnobs(self,*args): - raise exceptions.NotImplementedError() + raise NotImplementedError() def shutdown(self): - raise exceptions.NotImplementedError() + raise NotImplementedError() def printProperties(self, props): - raise exceptions.NotImplementedError() + raise NotImplementedError() -- cgit v1.2.3