diff --git a/parsedmarc/utils.py b/parsedmarc/utils.py index 4bea71a..b86cefc 100644 --- a/parsedmarc/utils.py +++ b/parsedmarc/utils.py @@ -325,9 +325,18 @@ def get_filename_safe_string(string): return string -def is_outlook_msg(suspect_bytes): - """Checks if the given content is a Outlook msg OLE file""" - return suspect_bytes.startswith(b"\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1") +def is_outlook_msg(content): + """ + Checks if the given content is a Outlook msg OLE file + + Args: + content: Content to check + + Returns: + bool: A flag the indicates if a file is a Outlook MSG file + """ + return type(content) == bytes and content.startswith( + b"\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1") def convert_outlook_msg(msg_bytes):