def remote_info(self): q = ServerQuerier(self.full_address) data = {} try: data['info'] = q.get_info() data['players'] = q.get_players() except: pass return data
def _query(self): try: server = ServerQuerier((self.address, self.port)) info = server.get_info() self.name = info['server_name'] self.map = info['map'] self.game = info['game'] self.version = info['version'] self.players = info['player_count'] self.maxplayers = info['max_players'] self.last_checked = datetime.now() self.status = True except (gaierror, NoResponseError): pass