From 3866858d18f77915dd146e7ca863a70f7f4242ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Tue, 17 Sep 2019 20:26:26 +0200 Subject: [PATCH] weechat-matrix: Handle errors from the sso helper. --- contrib/matrix_sso_helper | 1 + main.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/contrib/matrix_sso_helper b/contrib/matrix_sso_helper index fa85295..d0dafc2 100755 --- a/contrib/matrix_sso_helper +++ b/contrib/matrix_sso_helper @@ -119,6 +119,7 @@ def main(): return host, port = sock.getsockname() + sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) message = { "type": "redirectUrl", diff --git a/main.py b/main.py index 6068d93..0551640 100644 --- a/main.py +++ b/main.py @@ -419,6 +419,9 @@ def sso_login_cb(server_name, command, return_code, out, err): token = ret["loginToken"] server.login(token=token) + elif msgtype == "error": + server.error("Error in the SSO helper {}".format(ret["message"])) + else: server.error("Unknown SSO login message received from child " "process.")