Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraleherbau2011-06-03 06:47:14 -0400
committeraleherbau2011-06-03 06:47:14 -0400
commit8d4001044fedfebd3b27a84c2081a7979f7ba726 (patch)
tree50bf3f1896c893e8971d7d2b3d7c0172e5e74722 /python/src
parentb083234ac4a0ac26e59e36f5bf00897adb65b123 (diff)
downloadorg.eclipse.tcf-8d4001044fedfebd3b27a84c2081a7979f7ba726.tar.gz
org.eclipse.tcf-8d4001044fedfebd3b27a84c2081a7979f7ba726.tar.xz
org.eclipse.tcf-8d4001044fedfebd3b27a84c2081a7979f7ba726.zip
TCF Python: Fixed locator forgetting discovered peers, peer display in the shell
Diffstat (limited to 'python/src')
-rw-r--r--python/src/tcf/services/local/LocatorService.py2
-rw-r--r--python/src/tcf/shell.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/python/src/tcf/services/local/LocatorService.py b/python/src/tcf/services/local/LocatorService.py
index 41a1517fc..ebd2b4813 100644
--- a/python/src/tcf/services/local/LocatorService.py
+++ b/python/src/tcf/services/local/LocatorService.py
@@ -352,7 +352,7 @@ class LocatorService(locator.LocatorService):
stale_peers = None
for p in self.peers.values():
if isinstance(p, peer.RemotePeer):
- if p.getLastUpdateTime() + locator.DATA_RETENTION_PERIOD < time:
+ if p.getLastUpdateTime() + locator.DATA_RETENTION_PERIOD < tm:
if stale_peers == None: stale_peers = []
stale_peers.append(p)
if stale_peers is not None:
diff --git a/python/src/tcf/shell.py b/python/src/tcf/shell.py
index 68095d3fd..38942fe30 100644
--- a/python/src/tcf/shell.py
+++ b/python/src/tcf/shell.py
@@ -14,7 +14,7 @@ Simple interactive shell for TCF. This is basically a Python interpreter with a
TCF extensions.
Usage:
- python tcf/shell.py
+ python -m tcf.shell
Commands:
peers - Print discovered peers
@@ -45,7 +45,7 @@ class print_peers:
return tcf.peers()
def __repr__(self):
peers = tcf.peers()
- return '\n'.join(peers.keys())
+ return '\n'.join(map(lambda p: "%s, %s" % (p.getID(), p.getName()), peers.values()))
class Shell(code.InteractiveConsole, protocol.ChannelOpenListener, channel.ChannelListener):
def __init__(self):

Back to the top