From 1193e904bfe7af1413eb165f28754211ebf9e6e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Fri, 4 May 2018 16:06:48 +0200 Subject: [PATCH] fix: Properly handle attachments --- pymisp/tools/emailobject.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pymisp/tools/emailobject.py b/pymisp/tools/emailobject.py index d9d6bac..66a994a 100644 --- a/pymisp/tools/emailobject.py +++ b/pymisp/tools/emailobject.py @@ -39,7 +39,7 @@ class EMailObject(AbstractMISPObjectGenerator): def attachments(self): to_return = [] for attachment in self.__email.iter_attachments(): - to_return.append((attachment.get_filename(), BytesIO(attachment.get_content().as_bytes()))) + to_return.append((attachment.get_filename(), BytesIO(attachment.get_content()))) return to_return def generate_attributes(self):