From 7c42a5f748c3e6e59a1f16e1759a8baf42b730f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Thu, 10 Oct 2019 08:58:06 +0200 Subject: [PATCH] fix: Python2 SyntaxError... --- pymisp/mispevent.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/pymisp/mispevent.py b/pymisp/mispevent.py index 574466f..e3a10e8 100644 --- a/pymisp/mispevent.py +++ b/pymisp/mispevent.py @@ -1074,10 +1074,9 @@ class MISPObjectAttribute(MISPAttribute): self.to_ids = self._definition.get('to_ids') if not self.type: raise NewAttributeError("The type of the attribute is required. Is the object template missing?") - if sys.version_info < (3, 5): - super(MISPObjectAttribute, self).from_dict(**dict(self, **kwargs)) - else: - super(MISPObjectAttribute, self).from_dict(**{**self, **kwargs}) + super(MISPObjectAttribute, self).from_dict(**dict(self, **kwargs)) + # FIXME New syntax python3 only, keep for later. + # super(MISPObjectAttribute, self).from_dict(**{**self, **kwargs}) def __repr__(self): if hasattr(self, 'value'): @@ -1320,10 +1319,9 @@ class MISPObject(AbstractMISP): else: attribute = MISPObjectAttribute({}) # Overwrite the parameters of self._default_attributes_parameters with the ones of value - if sys.version_info < (3, 5): - attribute.from_dict(object_relation=object_relation, **dict(self._default_attributes_parameters, **value)) - else: - attribute.from_dict(object_relation=object_relation, **{**self._default_attributes_parameters, **value}) + attribute.from_dict(object_relation=object_relation, **dict(self._default_attributes_parameters, **value)) + # FIXME New syntax python3 only, keep for later. + # attribute.from_dict(object_relation=object_relation, **{**self._default_attributes_parameters, **value}) self.__fast_attribute_access[object_relation].append(attribute) self.Attribute.append(attribute) self.edited = True