def status(self):
        p = subprocess.Popen([self.supervisorctl_path, "status"],
            stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
        out = p.communicate()[0]
        for l in out.split('\n'):
            try:
                svc, status, info = whitespace_re.split(l.strip(), 2)
                service, process_name = svc.split(':')
            except __HOLE__:
                continue
            if service == self.resource.service_name:
                return status.strip() == "RUNNING"
        raise Fail("Service %s not managed by supervisor" % self.resource.service_name)
dataset/ETHPy150Open samuel/kokki/kokki/cookbooks/supervisor/libraries/providers.py/SupervisorServiceProvider.status