From 6d6f950c95c78c8bf7b8b602a50e22dba14ef00a Mon Sep 17 00:00:00 2001 From: Upstream Data Date: Wed, 30 Aug 2023 17:46:03 -0600 Subject: [PATCH] bug: add modified changed from [Issue 57](https://github.com/UpstreamData/pyasic/issues/57#issuecomment-1699984187) --- pyasic/API/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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"):