mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fix bug with bool obj on server start
This commit is contained in:
parent
9915899ecd
commit
6f80b3e5c1
@ -266,14 +266,24 @@ class Stats:
|
||||
"Unable to read the server icon due to the following error:", exc_info=e
|
||||
)
|
||||
if ping_obj:
|
||||
ping_data = {
|
||||
"online": online_stats.get("online", 0),
|
||||
"max": online_stats.get("max", 0),
|
||||
"players": online_stats.get("players", 0),
|
||||
"server_description": ping_obj.description,
|
||||
"server_version": ping_obj.version,
|
||||
"server_icon": server_icon,
|
||||
}
|
||||
try:
|
||||
ping_data = {
|
||||
"online": online_stats.get("online", 0),
|
||||
"max": online_stats.get("max", 0),
|
||||
"players": online_stats.get("players", 0),
|
||||
"server_description": ping_obj.description,
|
||||
"server_version": ping_obj.version,
|
||||
"server_icon": server_icon,
|
||||
}
|
||||
except:
|
||||
ping_data = {
|
||||
"online": online_stats.get("online", 0),
|
||||
"max": online_stats.get("max", 0),
|
||||
"players": online_stats.get("players", 0),
|
||||
"server_description": "",
|
||||
"server_version": "",
|
||||
"server_icon": server_icon,
|
||||
}
|
||||
else:
|
||||
ping_data = {
|
||||
"online": online_stats.get("online", 0),
|
||||
|
Loading…
Reference in New Issue
Block a user