From dcc4f75b1463f79e9622ba117fc11448df68cad4 Mon Sep 17 00:00:00 2001 From: Krista 'DarthMama' Bennett Date: Mon, 20 Jan 2020 16:03:31 +0100 Subject: [PATCH] not having a decoder shouldn't be a fatal error. --- test/sync_handshake.py | 6 ++++-- test/sync_test.py | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/sync_handshake.py b/test/sync_handshake.py index 337745b..4d37d8f 100644 --- a/test/sync_handshake.py +++ b/test/sync_handshake.py @@ -101,7 +101,10 @@ def add_debug_info(msg): m, keys, rating, flags = msg.decrypt(DONT_TRIGGER_SYNC) else: m = msg - text = "\n" + m.attachments[0].decode() + try: + text = "\n" + m.attachments[0].decode() + except UnicodeDecodeError as e: + text = "\n *** NO DECODER AVAILABLE FOR THIS MESSAGE TYPE ***\n" output(text) msg.opt_fields = { "pEp.sync": text } return msg @@ -267,4 +270,3 @@ if __name__=="__main__": multithreaded = options.multithreaded run(options.exec_for, options.color, options.imap, options.own_ident, options.leave) - diff --git a/test/sync_test.py b/test/sync_test.py index f11100b..175a2f9 100644 --- a/test/sync_test.py +++ b/test/sync_test.py @@ -225,4 +225,3 @@ if __name__ == "__main__": Laptop.join() if options.third: Pad.join() -