From e567ddc8776cee0519f6dc96cd16063d47555248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Thu, 24 Aug 2017 17:09:16 +0200 Subject: [PATCH] Update function names in mispevent --- pymisp/mispevent.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pymisp/mispevent.py b/pymisp/mispevent.py index 61c3b27..9d3fb63 100644 --- a/pymisp/mispevent.py +++ b/pymisp/mispevent.py @@ -221,6 +221,10 @@ class MISPAttribute(object): self._prepare_new_malware_sample() def _json(self): + # DEPRECATED + return self.to_dict() + + def to_dict(self): to_return = {'type': self.type, 'category': self.category, 'to_ids': self.to_ids, 'distribution': self.distribution, 'value': self.value, 'comment': self.comment, 'disable_correlation': self.disable_correlation} @@ -507,6 +511,10 @@ class MISPEvent(AbstractMISP): self.global_sig = kwargs['global_sig'] def _json(self): + # DEPTECATED + return self.to_dict() + + def to_dict(self): to_return = {'Event': {}} to_return['Event'] = {'distribution': self.distribution, 'info': self.info, 'date': self.date.isoformat(), 'published': self.published,