Fix warning aggregation and crashes on timeouts
This commit is contained in:
parent
2c1fb0d092
commit
b2c3967aeb
@ -299,8 +299,12 @@ help - Gebe diese Hilfe aus'''
|
|||||||
self._warnings1 = self._warnings0
|
self._warnings1 = self._warnings0
|
||||||
self._warnings0 = []
|
self._warnings0 = []
|
||||||
for source in self._sources:
|
for source in self._sources:
|
||||||
req = requests.get(source)
|
try:
|
||||||
self._warnings0 = parse_data(req.text)
|
req = requests.get(source)
|
||||||
|
self._warnings0 += parse_data(req.text)
|
||||||
|
except urllib3.exceptions.MaxRetryError:
|
||||||
|
log.warn('Connection timeout for request to %s', source)
|
||||||
|
continue
|
||||||
|
|
||||||
# Find new warnings and send the new ones
|
# Find new warnings and send the new ones
|
||||||
ids = map(lambda x: x.id, self._warnings1)
|
ids = map(lambda x: x.id, self._warnings1)
|
||||||
|
Loading…
Reference in New Issue
Block a user