summaryrefslogtreecommitdiff
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 35be4a9..209f88a 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -1954,7 +1954,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 d8ff7f4..fbb2a71 100644
--- a/b4/pr.py
+++ b/b4/pr.py
@@ -433,7 +433,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())
msgid = b4.LoreMessage.get_clean_msgid(msg)
lmsg = parse_pr_data(msg)
else: