mirror of https://github.com/CIRCL/AIL-framework
fix: [misp export] fix empty event on module start
parent
194ae960fc
commit
5fab2326e6
|
@ -319,11 +319,7 @@ class MISPExporterAutoDaily(MISPExporter):
|
||||||
def __init__(self, url='', key='', ssl=False):
|
def __init__(self, url='', key='', ssl=False):
|
||||||
super().__init__(url=url, key=key, ssl=ssl)
|
super().__init__(url=url, key=key, ssl=ssl)
|
||||||
|
|
||||||
# create event if don't exists
|
self.event_id = - 1
|
||||||
try:
|
|
||||||
self.event_id = self.get_daily_event_id()
|
|
||||||
except MISPConnectionError:
|
|
||||||
self.event_id = - 1
|
|
||||||
self.date = datetime.date.today()
|
self.date = datetime.date.today()
|
||||||
|
|
||||||
def export(self, obj, tag):
|
def export(self, obj, tag):
|
||||||
|
@ -345,6 +341,7 @@ class MISPExporterAutoDaily(MISPExporter):
|
||||||
self.add_event_object(self.event_id, obj)
|
self.add_event_object(self.event_id, obj)
|
||||||
|
|
||||||
except MISPConnectionError:
|
except MISPConnectionError:
|
||||||
|
self.event_id = - 1
|
||||||
return -1
|
return -1
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue