diff tests/unwrap-message-id.py @ 44729:26ce8e751503 stable 5.4rc0

merge default into stable for 5.4 release
author Pulkit Goyal <7895pulkit@gmail.com>
date Thu, 16 Apr 2020 22:51:09 +0530
parents a1908951ca42
children 6000f5b25c9b
line wrap: on
line diff
--- a/tests/unwrap-message-id.py	Mon Apr 13 16:30:13 2020 +0300
+++ b/tests/unwrap-message-id.py	Thu Apr 16 22:51:09 2020 +0530
@@ -1,6 +1,8 @@
 from __future__ import absolute_import, print_function
 
-import re
 import sys
 
-print(re.sub(r"(?<=Message-Id:) \n ", " ", sys.stdin.read()), end="")
+for line in sys.stdin:
+    if line.lower() in ("message-id: \n", "in-reply-to: \n"):
+        line = line[:-2]
+    print(line, end="")