mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Merge branch 'bugfix/server-stats' into 'dev'
Check for string response on server ping See merge request crafty-controller/crafty-4!614
This commit is contained in:
commit
242ba7899b
@ -5,6 +5,7 @@ TBD
|
||||
### Bug fixes
|
||||
- PWA: Removed the custom offline page in favour of browser default ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/607))
|
||||
- Fix hidden servers appearing visible on public mobile status page ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/612))
|
||||
- Correctly handle if a server returns a string instead of json data on socket ping ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/614))
|
||||
### Tweaks
|
||||
- Polish/Enhance display for InApp Documentation ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/613))
|
||||
### Lang
|
||||
|
@ -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