Skip to content

Commit

Permalink
fix: [misp export] fix empty event on module start
Browse files Browse the repository at this point in the history
  • Loading branch information
Terrtia committed Jan 30, 2024
1 parent 194ae96 commit 5fab232
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions bin/exporter/MISPExporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,7 @@ class MISPExporterAutoDaily(MISPExporter):
def __init__(self, url='', key='', ssl=False):
super().__init__(url=url, key=key, ssl=ssl)

# create event if don't exists
try:
self.event_id = self.get_daily_event_id()
except MISPConnectionError:
self.event_id = - 1
self.event_id = - 1
self.date = datetime.date.today()

def export(self, obj, tag):
Expand All @@ -345,6 +341,7 @@ def export(self, obj, tag):
self.add_event_object(self.event_id, obj)

except MISPConnectionError:
self.event_id = - 1
return -1


Expand Down

0 comments on commit 5fab232

Please sign in to comment.