diff options
author | aleherbau | 2011-06-03 10:47:14 +0000 |
---|---|---|
committer | aleherbau | 2011-06-03 10:47:14 +0000 |
commit | 8d4001044fedfebd3b27a84c2081a7979f7ba726 (patch) | |
tree | 50bf3f1896c893e8971d7d2b3d7c0172e5e74722 /python | |
parent | b083234ac4a0ac26e59e36f5bf00897adb65b123 (diff) | |
download | org.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')
-rw-r--r-- | python/src/tcf/services/local/LocatorService.py | 2 | ||||
-rw-r--r-- | python/src/tcf/shell.py | 4 | ||||
-rw-r--r-- | python/todo.twiki | 2 |
3 files changed, 4 insertions, 4 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):
diff --git a/python/todo.twiki b/python/todo.twiki index 57745b9a7..251c5ebb3 100644 --- a/python/todo.twiki +++ b/python/todo.twiki @@ -39,4 +39,4 @@ * [done] Simplified synchronous command invocation
* File object implementation based on FileSystem service
* [started] Interactive interpreter
- * JUnit tests
+ * Diagnostic tests
|