

def _get_tunnel(self, peer_node_id, tunnel_type=None):
    try:
        return [t for t in self.tunnels[peer_node_id].itervalues() if (t.tunnel_type == tunnel_type)][0]
    except:
        return None

dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/runtime/north/calvin_proto.py CalvinProto._get_tunnel/original