From e44e33fe903d0d3af551e4895f72d784269b2def Mon Sep 17 00:00:00 2001 From: Nicolas Bareil Date: Thu, 1 Dec 2016 10:48:33 +0100 Subject: [PATCH] capitalizeformat() does not exist on Python2 and fix category variables --- pymisp/mispevent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pymisp/mispevent.py b/pymisp/mispevent.py index 1fdd0cf..2223868 100644 --- a/pymisp/mispevent.py +++ b/pymisp/mispevent.py @@ -104,7 +104,7 @@ class MISPAttribute(object): def set_all_values(self, **kwargs): if kwargs.get('type') and kwargs.get('category'): if kwargs['type'] not in self.category_type_mapping[kwargs['category']]: - raise NewAttributeError('{} and {} is an invalid combinaison, type for this category has to be in {}'.capitalizeformat(self.type, self.category, (', '.join(self.category_type_mapping[self.category])))) + raise NewAttributeError('{} and {} is an invalid combinaison, type for this category has to be in {}'.format(self.type, self.category, (', '.join(self.category_type_mapping[kwargs['category']])))) # Required if kwargs.get('type'): self.type = kwargs['type']