From 5cd01c6116f2adb0a2d665c03b0afa08d6698bbf Mon Sep 17 00:00:00 2001 From: Mikey Sklar Date: Wed, 4 Jun 2025 11:37:46 -0700 Subject: [PATCH] linting --- Pi_Hole_Ad_Blocker/stats.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Pi_Hole_Ad_Blocker/stats.py b/Pi_Hole_Ad_Blocker/stats.py index d5af4450a..0e39361ce 100644 --- a/Pi_Hole_Ad_Blocker/stats.py +++ b/Pi_Hole_Ad_Blocker/stats.py @@ -31,7 +31,6 @@ # not support PIL/pillow (python imaging library)! -import json import subprocess import time @@ -102,7 +101,7 @@ while True: DNSQUERIES = data["queries"]["total"] ADSBLOCKED = data["queries"]["blocked"] CLIENTS = data["clients"]["total"] - except Exception: + except (KeyError, requests.RequestException, json.JSONDecodeError): DNSQUERIES = 0 ADSBLOCKED = 0 CLIENTS = 0