

def __get_service_url(self, service_name):
    try:
        cmd = ['kubectl.sh', 'describe', 'service', service_name]
        output = subprocess.check_output(cmd)
        ip_re = re.compile('LoadBalancer Ingress:(?P<ip>.*)\n')
        m = ip_re.search(output)
        if (not ip_re):
            error_log(self.TAG, 'Could not extract IP from service description')
            return None
        return m.group('ip').strip()
    except subprocess.CalledProcessError as e:
        return None

dataset/ETHPy150Open binder-project/binder/binder/cluster.py KubernetesManager.__get_service_url/VarMisuse@58/95 `m`->`ip_re`