Skip to content

Commit 5cd01c6

Browse files
committed
linting
1 parent e5c40eb commit 5cd01c6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Pi_Hole_Ad_Blocker/stats.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
# not support PIL/pillow (python imaging library)!
3232

3333

34-
import json
3534
import subprocess
3635
import time
3736

@@ -102,7 +101,7 @@
102101
DNSQUERIES = data["queries"]["total"]
103102
ADSBLOCKED = data["queries"]["blocked"]
104103
CLIENTS = data["clients"]["total"]
105-
except Exception:
104+
except (KeyError, requests.RequestException, json.JSONDecodeError):
106105
DNSQUERIES = 0
107106
ADSBLOCKED = 0
108107
CLIENTS = 0

0 commit comments

Comments
 (0)