Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorFrederic Leger2014-03-13 12:43:32 -0400
committerFrederic Leger2014-03-13 12:43:32 -0400
commitc74f4c68cf41d3c7584943d9f6e128b9957b2f8e (patch)
treeea05bd0dc660cf69e7d6ad74b3b17baccc2d0b1e /python
parent6f2ca0fd5d13419c2f6a7bd5845079d7ead2a2b9 (diff)
downloadorg.eclipse.tcf-c74f4c68cf41d3c7584943d9f6e128b9957b2f8e.tar.gz
org.eclipse.tcf-c74f4c68cf41d3c7584943d9f6e128b9957b2f8e.tar.xz
org.eclipse.tcf-c74f4c68cf41d3c7584943d9f6e128b9957b2f8e.zip
Python - Misc PEP8 fixes.
Diffstat (limited to 'python')
-rw-r--r--python/src/tcf/EventQueue.py4
-rw-r--r--python/src/tcf/__init__.py8
-rw-r--r--python/src/tcf/shell.py8
3 files changed, 10 insertions, 10 deletions
diff --git a/python/src/tcf/EventQueue.py b/python/src/tcf/EventQueue.py
index 1265b1972..7db8da02c 100644
--- a/python/src/tcf/EventQueue.py
+++ b/python/src/tcf/EventQueue.py
@@ -38,7 +38,7 @@ class EventQueue(object):
self.__lock.notifyAll()
self.__thread.join()
except Exception as e:
- from . import protocol
+ import protocol # as protocol import this module too
protocol.log("Failed to shutdown TCF event dispatch thread", e)
def isShutdown(self):
@@ -46,7 +46,7 @@ class EventQueue(object):
return self.__is_shutdown
def __error(self, x):
- from . import protocol
+ import protocol # as protocol import this module too
protocol.log("Unhandled exception in TCF event dispatch", x)
def __call__(self):
diff --git a/python/src/tcf/__init__.py b/python/src/tcf/__init__.py
index ec5e6b937..727db0940 100644
--- a/python/src/tcf/__init__.py
+++ b/python/src/tcf/__init__.py
@@ -18,7 +18,7 @@ import types
from . import protocol, peer, channel
from .util import task
-__all__ = ('connect')
+__all__ = ('connect', 'peers')
def connect(params, wait=True):
@@ -66,7 +66,7 @@ def _parse_params(paramStr):
raise ValueError("Expected format: <transport>:<host>:<port>")
transp, host, port = args
return {
- peer.ATTR_IP_HOST : host,
- peer.ATTR_IP_PORT : port,
- peer.ATTR_TRANSPORT_NAME : transp
+ peer.ATTR_IP_HOST: host,
+ peer.ATTR_IP_PORT: port,
+ peer.ATTR_TRANSPORT_NAME: transp
}
diff --git a/python/src/tcf/shell.py b/python/src/tcf/shell.py
index d868b60ed..cbb838652 100644
--- a/python/src/tcf/shell.py
+++ b/python/src/tcf/shell.py
@@ -42,8 +42,8 @@ except ImportError:
sys.path.insert(0, os.path.dirname(os.getcwd()))
import tcf
-from tcf.util import sync, event
-from tcf import protocol, channel
+from tcf.util import sync, event # @UnresolvedImport
+from tcf import protocol, channel # @UnresolvedImport
class print_peers:
@@ -61,8 +61,8 @@ class Shell(code.InteractiveConsole, protocol.ChannelOpenListener,
channel.ChannelListener):
def __init__(self):
locals = { # @ReservedAssignment
- "connect" : tcf.connect,
- "peers" : print_peers()
+ "connect": tcf.connect,
+ "peers": print_peers()
}
protocol.startEventQueue()
protocol.startDiscovery()

Back to the top