linux: handle JSONDecodeError
This commit is contained in:
parent
fa51899a24
commit
f50fe88a14
|
@ -43,6 +43,8 @@ class Linux(Plugin):
|
||||||
res = requests.get(self.KERNEL_FEED, timeout=10).json()
|
res = requests.get(self.KERNEL_FEED, timeout=10).json()
|
||||||
except requests.exceptions.RequestException:
|
except requests.exceptions.RequestException:
|
||||||
return '\x02[Kernel]\x02 Error fetching kernel.org releases'
|
return '\x02[Kernel]\x02 Error fetching kernel.org releases'
|
||||||
|
except requests.exceptions.JSONDecodeError:
|
||||||
|
return '\x02[Kernel]\x02 Error decoding kernel.org releases'
|
||||||
|
|
||||||
# Make list of releases
|
# Make list of releases
|
||||||
releases = []
|
releases = []
|
||||||
|
|
Loading…
Reference in New Issue
Block a user