diff --git a/pyasic/API/__init__.py b/pyasic/API/__init__.py index 8c775d32..d79af860 100644 --- a/pyasic/API/__init__.py +++ b/pyasic/API/__init__.py @@ -258,9 +258,12 @@ If you are sure you want to use this command please use API.send_command("{comma return False, data["Msg"] else: # make sure the command succeeded - if type(data["STATUS"]) == str: + if isinstance(data["STATUS"], str): if data["STATUS"] in ["RESTART"]: 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"): # this is an error if data["STATUS"][0]["STATUS"] not in ("S", "I"):