Check for string response on server ping

This commit is contained in:
Andrew 2023-08-02 19:20:26 -04:00
parent 834f6f3c3b
commit 2c4b90964d

View File

@ -16,6 +16,12 @@ logger = logging.getLogger(__name__)
class Server:
def __init__(self, data):
if isinstance(data, str):
logger.error(
"Failed to calculate stats. Expected object. "
f"Server returned string: {data}"
)
return
self.description = data.get("description")
# print(self.description)
if isinstance(self.description, dict):