From bc8a397752acd5684773c1ad8157b952c497ee6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Fri, 9 Nov 2018 10:55:27 +0100 Subject: [PATCH] new: change_distribution method Fix: #294 --- pymisp/api.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pymisp/api.py b/pymisp/api.py index 3011ec0..a951bc5 100644 --- a/pymisp/api.py +++ b/pymisp/api.py @@ -468,6 +468,12 @@ class PyMISP(object): e.analysis = analysis_status return self.update(e) + def change_distribution(self, event, distribution): + """Change the distribution of an event""" + e = self._make_mispevent(event) + e.distribution = distribution + return self.update(e) + def change_sharing_group(self, event, sharing_group_id): """Change the sharing group of an event""" e = self._make_mispevent(event)