From b725df1972ce7a41110a2278756260e7166fb716 Mon Sep 17 00:00:00 2001 From: Volker Birk Date: Wed, 27 Mar 2019 07:49:59 +0100 Subject: [PATCH] nicer printing --- test/sync_handshake.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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):