Check if ping result is boolean

What does this MR do and why?

Fixes stack on server ping when no stats object is received.

Screenshots or screen recordings

Exception in thread 1_server_thread:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/var/opt/minecraft/crafty4/crafty-4/app/classes/shared/server.py", line 466, in start_server
    self.record_server_stats()
  File "/var/opt/minecraft/crafty4/crafty-4/app/classes/shared/server.py", line 1505, in record_server_stats
    server_stats = self.get_servers_stats()
  File "/var/opt/minecraft/crafty4/crafty-4/app/classes/shared/server.py", line 1283, in get_servers_stats
    ping_data = Stats.parse_server_ping(int_mc_ping)
  File "/var/opt/minecraft/crafty4/crafty-4/app/classes/minecraft/stats.py", line 273, in parse_server_ping
    "server_description": ping_obj.description,
AttributeError: 'bool' object has no attribute 'description'

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

  • Have you checked this doesn't interfere/conflict/duplicate someone elses work?
  • Have you fully tested your changes?
  • Have you resolved any lint issues?
  • Have you assigned a reviewer?
  • Have you applied correct labels?
  • Have you updated CHANGELOG.md?
Edited by Iain Powrie

Merge request reports

Loading