mirror of https://github.com/CIRCL/lookyloo
chg: Catch timeouts when pushing to MISP
parent
d1f673f3a7
commit
22d8672131
|
@ -100,7 +100,10 @@ class MISP():
|
||||||
return {'error': events}
|
return {'error': events}
|
||||||
to_return = []
|
to_return = []
|
||||||
for event in events:
|
for event in events:
|
||||||
new_event = self.client.add_event(event, pythonify=True)
|
try:
|
||||||
|
new_event = self.client.add_event(event, pythonify=True)
|
||||||
|
except requests.exceptions.ReadTimeout:
|
||||||
|
return {'error': 'The connection to MISP timed out, try increasing the timeout in the config.'}
|
||||||
if isinstance(new_event, MISPEvent):
|
if isinstance(new_event, MISPEvent):
|
||||||
to_return.append(new_event)
|
to_return.append(new_event)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue