From 555eb66c9b8cbfd5a1443434b65c46f0379493c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?poljar=20=28Damir=20Jeli=C4=87=29?= Date: Thu, 25 Jan 2018 12:33:50 +0100 Subject: [PATCH] Pretty print the error object. --- weechat-matrix.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/weechat-matrix.py b/weechat-matrix.py index 906ec33..edef4cb 100644 --- a/weechat-matrix.py +++ b/weechat-matrix.py @@ -2205,6 +2205,8 @@ def matrix_handle_message( message = extra_data["message"] room_id = extra_data["room_id"] date = int(time.time()) + # TODO the event_id can be missing if sending has failed for + # some reason event_id = response["event_id"] # This message will be part of the next sync, we already printed it out @@ -2330,7 +2332,7 @@ def receive_cb(server_name, file_descriptor): message = server.receive_queue.popleft() server.send_queue.appendleft(message) - server_buffer_prnt(server, error) + server_buffer_prnt(server, pprint.pformat(error)) return W.WEECHAT_RC_OK if not data: