def get_any_active(self): tokens = self.get_all_active() if tokens: return tokens[0] Log.error("No valid token detected. Script will crash") return {}
def repeat_last_task(self): function = self.current_task["function"] phone = self.current_task["phone"] if function == "get_phone_name": return self.get_phone_name(phone) if function == "get_phone_tags": return self.get_phone_tags(phone) Log.error("Incorrect task for repeat") return None