diff --git a/test/sync_handshake.py b/test/sync_handshake.py index d046f6e..31f5e81 100644 --- a/test/sync_handshake.py +++ b/test/sync_handshake.py @@ -52,9 +52,12 @@ def print_msg(p): msg = pEp.Message(t) print("\n" + colored(p.name, color)) print(colored(str(datetime.fromtimestamp(p.stat().st_mtime)), color)) - m = re.search("(.*)", msg.opt_fields["pEp.sync"]) + m = re.search("(.*)", msg.opt_fields["pEp.sync"].replace("\n", " ")) if m: - print(m.group(1).strip()) + text = m.group(1).replace("\r", "").strip() + while text.count(" "): + text = text.replace(" ", " ") + print(text) def messageToSend(msg):