Appease the linter

This commit is contained in:
amcmanu3 2022-03-03 19:47:49 -05:00
parent ab7889914f
commit dfa9ab40ca
3 changed files with 1 additions and 16 deletions

View File

@ -774,11 +774,10 @@ class Server:
total_players = 0 total_players = 0
max_players = 0 max_players = 0
servers_ping = [] servers_ping = []
players_ping = {}
raw_ping_result = [] raw_ping_result = []
raw_ping_result = self.get_raw_server_stats(self.server_id) raw_ping_result = self.get_raw_server_stats(self.server_id)
if ("{}".format(raw_ping_result.get('icon')) == "b''"): if f"{raw_ping_result.get('icon')}" == "b''":
raw_ping_result['icon'] = False raw_ping_result['icon'] = False
servers_ping.append({ servers_ping.append({
@ -827,10 +826,6 @@ class Server:
) )
total_players += int(raw_ping_result.get('online')) total_players += int(raw_ping_result.get('online'))
max_players += int(raw_ping_result.get('max')) max_players += int(raw_ping_result.get('max'))
players_ping = {
'total_players': total_players,
'max_players': max_players
}
self.record_server_stats() self.record_server_stats()

View File

@ -12,7 +12,6 @@ import requests
import tornado.web import tornado.web
import tornado.escape import tornado.escape
from tornado import iostream from tornado import iostream
from tornado.ioloop import IOLoop
#TZLocal is set as a hidden import on win pipeline #TZLocal is set as a hidden import on win pipeline
from tzlocal import get_localzone from tzlocal import get_localzone

View File

@ -3,8 +3,6 @@ import logging
from app.classes.shared.helpers import helper from app.classes.shared.helpers import helper
from app.classes.web.base_handler import BaseHandler from app.classes.web.base_handler import BaseHandler
from app.classes.shared.server import Server
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
class StatusHandler(BaseHandler): class StatusHandler(BaseHandler):
@ -16,10 +14,6 @@ class StatusHandler(BaseHandler):
server_data = srv.get('server_data', False) server_data = srv.get('server_data', False)
server_id = server_data.get('server_id', False) server_id = server_data.get('server_id', False)
srv['raw_ping_result'] = self.controller.servers.get_server_stats_by_id(server_id) srv['raw_ping_result'] = self.controller.servers.get_server_stats_by_id(server_id)
srv['raw_ping_result']
{
'icon': False,
}
template = 'public/status.html' template = 'public/status.html'
@ -35,9 +29,6 @@ class StatusHandler(BaseHandler):
server_data = srv.get('server_data', False) server_data = srv.get('server_data', False)
server_id = server_data.get('server_id', False) server_id = server_data.get('server_id', False)
srv['raw_ping_result'] = self.controller.servers.get_server_stats_by_id(server_id) srv['raw_ping_result'] = self.controller.servers.get_server_stats_by_id(server_id)
{
'icon': False,
}
template = 'public/status.html' template = 'public/status.html'