

def check_status(self):
    status = None
    try:
        status = self.daemon.is_running()
        if ((self.start_timeout < 30) and (not status)):
            sleep(1)
            self.start_timeout += 1
            self.check_status()
        elif status:
            return True
        else:
            raise Timeout('LBRY daemon is running, but connection timed out')
    except:
        if (self.start_timeout < 30):
            sleep(1)
            self.start_timeout += 1
            self.check_status()
        else:
            raise Timeout('Timed out trying to start LBRY daemon')

dataset/ETHPy150Open lbryio/lbry/lbrynet/lbrynet_daemon/Apps/LBRYURIHandler.py LBRYURIHandler.check_status/original