From 6fef2c60e35f5867c7c32b2a1cfc7e4386cb22ac Mon Sep 17 00:00:00 2001 From: Richard van den Berg Date: Fri, 31 Mar 2017 11:29:02 +0200 Subject: [PATCH] Return json when adding attributes --- pymisp/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pymisp/api.py b/pymisp/api.py index 73980de..c2c15ab 100644 --- a/pymisp/api.py +++ b/pymisp/api.py @@ -409,7 +409,7 @@ class PyMISP(object): else: session = self.__prepare_session() url = urljoin(self.root_url, 'attributes/add/{}'.format(eventID_to_update)) - response = session.post(url, data=json.dumps(a, cls=EncodeUpdate)) + response = self._check_response(session.post(url, data=json.dumps(a, cls=EncodeUpdate))) return response def add_named_attribute(self, event, type_value, value, category=None, to_ids=False, comment=None, distribution=None, proposal=False, **kwargs):