mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Check for string response on server ping
This commit is contained in:
parent
834f6f3c3b
commit
2c4b90964d
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user