From 986f80ff9b5d4088ca051cb784826ebba069dbd8 Mon Sep 17 00:00:00 2001 From: ocurero Date: Mon, 11 Jul 2016 16:56:22 +0200 Subject: [PATCH 1/2] get_peers returns the list of locations and the names of the peers --- py2/asyncoro/disasyncoro.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py2/asyncoro/disasyncoro.py b/py2/asyncoro/disasyncoro.py index f8c2256..04b61a8 100644 --- a/py2/asyncoro/disasyncoro.py +++ b/py2/asyncoro/disasyncoro.py @@ -110,7 +110,7 @@ def __init__(self, name, location, auth, keyfile, certfile): @staticmethod def get_peers(): _Peer._lock.acquire() - peers = [Location(addr, port) for (addr, port) in _Peer.peers.iterkeys()] + peers = [PeerStatus(peer.location, peer.name, PeerStatus.Online) for peer in _Peer.peers.itervalues()] _Peer._lock.release() return peers From 659d55a3585cb3f69aa5c47d29a9befe90a07020 Mon Sep 17 00:00:00 2001 From: ocurero Date: Mon, 11 Jul 2016 16:57:14 +0200 Subject: [PATCH 2/2] get_peers returns the list of locations and the names of the peers --- py3/asyncoro/disasyncoro.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py3/asyncoro/disasyncoro.py b/py3/asyncoro/disasyncoro.py index f2e7ee8..ce2e64e 100644 --- a/py3/asyncoro/disasyncoro.py +++ b/py3/asyncoro/disasyncoro.py @@ -110,7 +110,7 @@ def __init__(self, name, location, auth, keyfile, certfile): @staticmethod def get_peers(): _Peer._lock.acquire() - peers = [Location(addr, port) for (addr, port) in _Peer.peers.keys()] + peers = [PeerStatus(peer.location, peer.name, PeerStatus.Online) for peer in _Peer.peers.itervalues()] _Peer._lock.release() return peers