

def verifyPeer(self, uuid, peer):
    LOGGER.debug(('Verifying peer %s' % uuid))
    deferreds = []
    if ('port' in peer):
        port = int(peer['port'][0])
    else:
        port = self.port
    if (uuid not in self.peers):
        self.peers[uuid] = {
            
        }
    self.peers[uuid]['active'] = False
    self.peers[uuid]['port'] = port
    if ('local_ip' in peer):
        local_ip = peer['local_ip'][0]
        local_url = ('http://%s:%s/server' % (local_ip, port))
        d = self.rq.getPage(local_url, timeout=5, prioritize=True)
        d.addCallback(self._verifyPeerLocalIPCallback, uuid, local_ip, port)
        deferreds.append(d)
    if ('public_ip' in peer):
        public_ip = peer['public_ip'][0]
        public_url = ('http://%s:%s/server' % (public_ip, port))
        d = self.rq.getPage(public_url, timeout=5, prioritize=True)
        d.addCallback(self._verifyPeerPublicIPCallback, uuid, public_ip, port)
        deferreds.append(d)
    if (len(deferreds) > 0):
        d = DeferredList(deferreds, consumeErrors=True)
        return self
    else:
        return None

dataset/ETHPy150Open wehriam/awspider/awspider/servers/execution.py ExecutionServer.verifyPeer/VarMisuse@283/388 `d`->`self`