def _check_node_boot_success(self, node): time_to_wait = int(self.config.get("detection", "time_to_wait")) check_timeout = int(self.config.get("detection", "check_timeout")) detector = Detector(node) print "waiting node to boot" time.sleep(time_to_wait) print "start check node boot status" while check_timeout > 0: try: if detector.check_network_status() == FailureType.HEALTH: return True except Exception as e: print str(e) finally: time.sleep(1) check_timeout -= 1 return False