Browse Source

nicer printing

PYADPT-55
Volker Birk 6 years ago
parent
commit
b725df1972
  1. 7
      test/sync_handshake.py

7
test/sync_handshake.py

@ -52,9 +52,12 @@ def print_msg(p):
msg = pEp.Message(t) msg = pEp.Message(t)
print("\n" + colored(p.name, color)) print("\n" + colored(p.name, color))
print(colored(str(datetime.fromtimestamp(p.stat().st_mtime)), color)) print(colored(str(datetime.fromtimestamp(p.stat().st_mtime)), color))
m = re.search("<payload>(.*)</payload>", msg.opt_fields["pEp.sync"]) m = re.search("<payload>(.*)</payload>", msg.opt_fields["pEp.sync"].replace("\n", " "))
if m: 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): def messageToSend(msg):

Loading…
Cancel
Save