From 98a008e67aa806df790223968282c0de8b09ec03 Mon Sep 17 00:00:00 2001 From: Hannah Ward Date: Mon, 6 Feb 2017 11:06:37 +0000 Subject: [PATCH] fix: Don't auto-publish events --- pymisp/mispevent.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pymisp/mispevent.py b/pymisp/mispevent.py index 8dc7c32..24bf839 100644 --- a/pymisp/mispevent.py +++ b/pymisp/mispevent.py @@ -440,6 +440,8 @@ class MISPEvent(object): if self.analysis not in [0, 1, 2]: raise NewEventError('{} is invalid, the analysis has to be in 0, 1, 2'.format(self.analysis)) if kwargs.get('published') is not None: + self.unpublish() + if kwargs.get("published") == True: self.publish() if kwargs.get('date'): self.set_date(kwargs['date'])