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 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