This commit is contained in:
Upstream Data
2023-08-30 17:46:03 -06:00
parent 30745e54ba
commit 6d6f950c95

View File

@@ -258,9 +258,12 @@ If you are sure you want to use this command please use API.send_command("{comma
return False, data["Msg"] return False, data["Msg"]
else: else:
# make sure the command succeeded # make sure the command succeeded
if type(data["STATUS"]) == str: if isinstance(data["STATUS"], str):
if data["STATUS"] in ["RESTART"]: if data["STATUS"] in ["RESTART"]:
return True, None return True, None
elif isinstance(data["STATUS"], dict):
if data["STATUS"].get("STATUS") in ["S", "I"]:
return True, None
elif data["STATUS"][0]["STATUS"] not in ("S", "I"): elif data["STATUS"][0]["STATUS"] not in ("S", "I"):
# this is an error # this is an error
if data["STATUS"][0]["STATUS"] not in ("S", "I"): if data["STATUS"][0]["STATUS"] not in ("S", "I"):