Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Leger2016-07-07 09:18:03 +0000
committerFrederic Leger2016-07-07 09:18:03 +0000
commit72c9f8995912207a44d31c82f74056248e882dba (patch)
tree58e4f7c74b1b3138b6abeffa80d505df8d56bab0 /python/src/tcf/transport.py
parent69846a1fda38662c05543d5b584086cf0fbc8406 (diff)
downloadorg.eclipse.tcf-72c9f8995912207a44d31c82f74056248e882dba.tar.gz
org.eclipse.tcf-72c9f8995912207a44d31c82f74056248e882dba.tar.xz
org.eclipse.tcf-72c9f8995912207a44d31c82f74056248e882dba.zip
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.
Diffstat (limited to 'python/src/tcf/transport.py')
-rw-r--r--python/src/tcf/transport.py10
1 files changed, 5 insertions, 5 deletions
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):

Back to the top