From b2035eef60c43246e4e7b45e47feec62823d246e Mon Sep 17 00:00:00 2001 From: Zedifus Date: Thu, 7 Dec 2023 11:29:18 +0000 Subject: [PATCH] Fix sonar findings --- app/classes/shared/main_controller.py | 2 +- app/frontend/templates/panel/loading.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/classes/shared/main_controller.py b/app/classes/shared/main_controller.py index 27104b62..c8ac3b3c 100644 --- a/app/classes/shared/main_controller.py +++ b/app/classes/shared/main_controller.py @@ -85,7 +85,7 @@ class Controller: encoding="utf-8", ) as f: self.auth_tracker = json.load(f) - except: + except (FileNotFoundError, json.JSONDecodeError): self.auth_tracker = {} def log_attempt(self, remote_ip, username): diff --git a/app/frontend/templates/panel/loading.html b/app/frontend/templates/panel/loading.html index b4848beb..a56a75ee 100644 --- a/app/frontend/templates/panel/loading.html +++ b/app/frontend/templates/panel/loading.html @@ -10,7 +10,7 @@
+ alt="Crafty Logo, Crafty is loading" width="20%" style="clear: both;">


@@ -70,4 +70,4 @@ }); -{% end %} \ No newline at end of file +{% end %}