Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'python/src/tcf/shell.py')
-rw-r--r--python/src/tcf/shell.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/src/tcf/shell.py b/python/src/tcf/shell.py
index dacd3d3fe..7e0f8c54f 100644
--- a/python/src/tcf/shell.py
+++ b/python/src/tcf/shell.py
@@ -34,6 +34,8 @@ from tcf.util import sync, event
from tcf import protocol, channel
class print_peers:
+ def __call__(self):
+ return tcf.peers()
def __repr__(self):
peers = tcf.peers()
return '\n'.join(peers.keys())
@@ -53,6 +55,7 @@ class Shell(code.InteractiveConsole, protocol.ChannelOpenListener, channel.Chann
super(Shell, self).interact(banner)
finally:
protocol.invokeLater(protocol.removeChannelOpenListener, self)
+ protocol.getEventQueue().shutdown()
def onChannelOpen(self, channel):
wrapper = sync.DispatchWrapper(channel)
self.locals["channel"] = wrapper
@@ -71,7 +74,7 @@ class Shell(code.InteractiveConsole, protocol.ChannelOpenListener, channel.Chann
def interact():
try:
# enable commandline editing if available
- import readline
+ import readline #@UnusedImport
except ImportError:
pass
shell = Shell()

Back to the top