From dfa9ab40caa8c37c94f97ff23509644e8e4acaca Mon Sep 17 00:00:00 2001 From: amcmanu3 Date: Thu, 3 Mar 2022 19:47:49 -0500 Subject: [PATCH] Appease the linter --- app/classes/shared/server.py | 7 +------ app/classes/web/panel_handler.py | 1 - app/classes/web/status_handler.py | 9 --------- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/app/classes/shared/server.py b/app/classes/shared/server.py index 084fd77e..f06cde2c 100644 --- a/app/classes/shared/server.py +++ b/app/classes/shared/server.py @@ -774,11 +774,10 @@ class Server: total_players = 0 max_players = 0 servers_ping = [] - players_ping = {} raw_ping_result = [] 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 servers_ping.append({ @@ -827,10 +826,6 @@ class Server: ) total_players += int(raw_ping_result.get('online')) max_players += int(raw_ping_result.get('max')) - players_ping = { - 'total_players': total_players, - 'max_players': max_players - } self.record_server_stats() diff --git a/app/classes/web/panel_handler.py b/app/classes/web/panel_handler.py index b41d36b6..d8f33f21 100644 --- a/app/classes/web/panel_handler.py +++ b/app/classes/web/panel_handler.py @@ -12,7 +12,6 @@ import requests import tornado.web import tornado.escape from tornado import iostream -from tornado.ioloop import IOLoop #TZLocal is set as a hidden import on win pipeline from tzlocal import get_localzone diff --git a/app/classes/web/status_handler.py b/app/classes/web/status_handler.py index a5b869a8..3b90e1d6 100644 --- a/app/classes/web/status_handler.py +++ b/app/classes/web/status_handler.py @@ -3,8 +3,6 @@ import logging from app.classes.shared.helpers import helper from app.classes.web.base_handler import BaseHandler -from app.classes.shared.server import Server - logger = logging.getLogger(__name__) class StatusHandler(BaseHandler): @@ -16,10 +14,6 @@ class StatusHandler(BaseHandler): server_data = srv.get('server_data', 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'] - { - 'icon': False, - } template = 'public/status.html' @@ -35,9 +29,6 @@ class StatusHandler(BaseHandler): server_data = srv.get('server_data', False) server_id = server_data.get('server_id', False) srv['raw_ping_result'] = self.controller.servers.get_server_stats_by_id(server_id) - { - 'icon': False, - } template = 'public/status.html'