From ca4318754d80d54ae7a009712d8712f429b00544 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 26 Oct 2020 21:28:47 +0100 Subject: [PATCH] Catch any exception for server version RPC It is the first method called with the input of the user. The login window does not support that it raises an exception and as a lot of different exceptions can be raised (and may change depending of Python version), we must catch all of them. It does not hide any programming error as they are logged. issue9408 review292561004 --- tryton/rpc.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tryton/rpc.py b/tryton/rpc.py index 22df3da148..f45baae79f 100644 --- a/tryton/rpc.py +++ b/tryton/rpc.py @@ -3,7 +3,6 @@ import http.client import logging import socket -import ssl import os try: from http import HTTPStatus @@ -67,7 +66,7 @@ def server_version(host, port): result = connection.common.server.version() logging.getLogger(__name__).debug(repr(result)) return result - except (Fault, socket.error, ssl.SSLError, ssl.CertificateError) as e: + except Exception as e: logging.getLogger(__name__).error(e) return None