From d311ccbfa11e18a561fe935431f9c92d974474f5 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 20 Mar 2022 07:05:11 -0400 Subject: [PATCH 1/2] Remove print statement everytime a page loads --- app/classes/web/panel_handler.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/classes/web/panel_handler.py b/app/classes/web/panel_handler.py index ee07a227..89a6fd1b 100644 --- a/app/classes/web/panel_handler.py +++ b/app/classes/web/panel_handler.py @@ -184,7 +184,6 @@ class PanelHandler(BaseHandler): # pylint: disable=unused-variable api_key, token_data, exec_user = self.current_user superuser = exec_user['superuser'] - print() if api_key is not None: superuser = superuser and api_key.superuser @@ -1037,7 +1036,6 @@ class PanelHandler(BaseHandler): server_obj.path = server_obj.path server_obj.log_path = server_obj.log_path server_obj.executable = server_obj.executable - print(server_obj.execution_command) server_obj.execution_command = server_obj.execution_command server_obj.server_ip = server_obj.server_ip server_obj.server_port = server_obj.server_port From 5682455bccea61cdc0903741b2494bdd2d456b71 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 20 Mar 2022 12:39:57 -0400 Subject: [PATCH 2/2] Appease the linter --- app/classes/web/panel_handler.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/app/classes/web/panel_handler.py b/app/classes/web/panel_handler.py index 89a6fd1b..3fa99fcc 100644 --- a/app/classes/web/panel_handler.py +++ b/app/classes/web/panel_handler.py @@ -181,8 +181,7 @@ class PanelHandler(BaseHandler): now = time.time() formatted_time = str(datetime.datetime.fromtimestamp(now).strftime('%Y-%m-%d %H:%M:%S')) - # pylint: disable=unused-variable - api_key, token_data, exec_user = self.current_user + api_key, _token_data, exec_user = self.current_user superuser = exec_user['superuser'] if api_key is not None: superuser = superuser and api_key.superuser @@ -531,8 +530,6 @@ class PanelHandler(BaseHandler): elif page == 'panel_config': auth_servers = {} auth_role_servers = {} - users_list = [] - role_users = {} roles = self.controller.roles.get_all_roles() user_roles = {} for user in self.controller.users.get_all_users(): @@ -951,8 +948,7 @@ class PanelHandler(BaseHandler): @tornado.web.authenticated def post(self, page): - # pylint: disable=unused-variable - api_key, token_data, exec_user = self.current_user + api_key, _token_data, exec_user = self.current_user superuser = exec_user['superuser'] if api_key is not None: superuser = superuser and api_key.superuser @@ -1681,8 +1677,7 @@ class PanelHandler(BaseHandler): @tornado.web.authenticated def delete(self, page): - # pylint: disable=unused-variable - api_key, token_data, exec_user = self.current_user + api_key, _token_data, exec_user = self.current_user superuser = exec_user['superuser'] if api_key is not None: superuser = superuser and api_key.superuser