tests/unwrap-message-id.py
author Gregory Szorc <gregory.szorc@gmail.com>
Mon, 04 Nov 2019 20:21:31 -0800
branchstable
changeset 43408 d9e7ac50b80a
parent 43334 4128ffba4431
child 44405 a1908951ca42
permissions -rw-r--r--
run-tests: use byte strings for inserted output We were inserting str on Python 3 which resulted in mixed str/bytes types on the list. This would later blow up when trying to write str to the .err file opened in bytes mode. Differential Revision: https://phab.mercurial-scm.org/D7222
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
43334
4128ffba4431 tests: handle Message-Id email header possible wrapping
Denis Laxalde <denis@laxalde.org>
parents:
diff changeset
     1
from __future__ import absolute_import, print_function
4128ffba4431 tests: handle Message-Id email header possible wrapping
Denis Laxalde <denis@laxalde.org>
parents:
diff changeset
     2
4128ffba4431 tests: handle Message-Id email header possible wrapping
Denis Laxalde <denis@laxalde.org>
parents:
diff changeset
     3
import re
4128ffba4431 tests: handle Message-Id email header possible wrapping
Denis Laxalde <denis@laxalde.org>
parents:
diff changeset
     4
import sys
4128ffba4431 tests: handle Message-Id email header possible wrapping
Denis Laxalde <denis@laxalde.org>
parents:
diff changeset
     5
4128ffba4431 tests: handle Message-Id email header possible wrapping
Denis Laxalde <denis@laxalde.org>
parents:
diff changeset
     6
print(re.sub(r"(?<=Message-Id:) \n ", " ", sys.stdin.read()), end="")