linux: handle JSONDecodeError

This commit is contained in:
jkhsjdhjs 2023-07-21 11:47:54 +00:00
parent fa51899a24
commit f50fe88a14

View File

@ -43,6 +43,8 @@ class Linux(Plugin):
res = requests.get(self.KERNEL_FEED, timeout=10).json()
except requests.exceptions.RequestException:
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
releases = []