aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--b4/__init__.py2
-rw-r--r--b4/pr.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index c019358..bc05dcd 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -2075,7 +2075,7 @@ def get_requests_session():
def get_msgid_from_stdin():
if not sys.stdin.isatty():
- message = email.message_from_string(sys.stdin.read())
+ message = email.message_from_bytes(sys.stdin.buffer.read())
return message.get('Message-ID', None)
return None
diff --git a/b4/pr.py b/b4/pr.py
index c5c5fc7..5a66180 100644
--- a/b4/pr.py
+++ b/b4/pr.py
@@ -507,7 +507,7 @@ def main(cmdargs):
if not sys.stdin.isatty():
logger.debug('Getting PR message from stdin')
- msg = email.message_from_string(sys.stdin.read())
+ msg = email.message_from_bytes(sys.stdin.buffer.read())
cmdargs.msgid = b4.LoreMessage.get_clean_msgid(msg)
lmsg = parse_pr_data(msg)
else: