diff options
-rw-r--r-- | b4/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/b4/__init__.py b/b4/__init__.py index bc05dcd..745485e 100644 --- a/b4/__init__.py +++ b/b4/__init__.py @@ -2075,7 +2075,9 @@ def get_requests_session(): def get_msgid_from_stdin(): if not sys.stdin.isatty(): - message = email.message_from_bytes(sys.stdin.buffer.read()) + from email.parser import BytesParser + message = BytesParser().parsebytes( + sys.stdin.buffer.read(), headersonly=True) return message.get('Message-ID', None) return None |