From 72c9f8995912207a44d31c82f74056248e882dba Mon Sep 17 00:00:00 2001 From: Frederic Leger Date: Thu, 7 Jul 2016 11:18:03 +0200 Subject: TCF Python: Python 3 compliance. The whole TCF python code should now be python 2 AND python 3 compatible. As there are few tests, I made sure this works by running the BasicTests.py and ProcessStart.py using both a python2 or python3 interpreter.--- python/src/tcf/transport.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'python/src/tcf/transport.py') diff --git a/python/src/tcf/transport.py b/python/src/tcf/transport.py index f46df217a..e2bada707 100644 --- a/python/src/tcf/transport.py +++ b/python/src/tcf/transport.py @@ -1,5 +1,5 @@ # ***************************************************************************** -# * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. +# * Copyright (c) 2011, 2013, 2016 Wind River Systems, Inc. and others. # * All rights reserved. This program and the accompanying materials # * are made available under the terms of the Eclipse Public License v1.0 # * which accompanies this distribution, and is available at @@ -11,7 +11,7 @@ import threading -from . import protocol, channel +from . import protocol, channel from .services import locator _channels = [] @@ -125,7 +125,7 @@ class TCPTransportProvider(TransportProvider): port = attrs.get(peer.ATTR_IP_PORT) if not host: raise RuntimeError("No host name") - from channel.ChannelTCP import ChannelTCP + from .channel.ChannelTCP import ChannelTCP return ChannelTCP(p, host, _parsePort(port)) @@ -135,8 +135,8 @@ def _parsePort(port): try: return int(port) except Exception: - raise RuntimeError( - "Invalid value of \"Port\" attribute. Must be decimal number.") + raise RuntimeError("Invalid value of \"Port\" attribute. Must be " + + "decimal number.") def sendEvent(service_name, event_name, data): -- cgit v1.2.3