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}
|
||||
to_return = []
|
||||
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):
|
||||
to_return.append(new_event)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue