We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e5c40eb commit 5cd01c6Copy full SHA for 5cd01c6
1 file changed
Pi_Hole_Ad_Blocker/stats.py
@@ -31,7 +31,6 @@
31
# not support PIL/pillow (python imaging library)!
32
33
34
-import json
35
import subprocess
36
import time
37
@@ -102,7 +101,7 @@
102
101
DNSQUERIES = data["queries"]["total"]
103
ADSBLOCKED = data["queries"]["blocked"]
104
CLIENTS = data["clients"]["total"]
105
- except Exception:
+ except (KeyError, requests.RequestException, json.JSONDecodeError):
106
DNSQUERIES = 0
107
ADSBLOCKED = 0
108
CLIENTS = 0
0 commit comments