Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'python/src/tcf')
-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