From f81cd897e7f7fd43c7f857bf2556aca157a6c060 Mon Sep 17 00:00:00 2001 From: Volker Birk Date: Tue, 26 Mar 2019 22:08:14 +0100 Subject: [PATCH] more compat --- test/sync_handshake.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/sync_handshake.py b/test/sync_handshake.py index 17f91da..d046f6e 100644 --- a/test/sync_handshake.py +++ b/test/sync_handshake.py @@ -51,9 +51,10 @@ def print_msg(p): t = f.read(-1) msg = pEp.Message(t) print("\n" + colored(p.name, color)) - print(colored(datetime.fromtimestamp(p.stat().st_mtime), color)) + print(colored(str(datetime.fromtimestamp(p.stat().st_mtime)), color)) m = re.search("(.*)", msg.opt_fields["pEp.sync"]) - print(m.group(1).strip()) + if m: + print(m.group(1).strip()) def messageToSend(msg):