changeset 9990c3ed2cfd in tryton:5.0
details: https://hg.tryton.org/tryton?cmd=changeset;node=9990c3ed2cfd
description:
        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
        (grafted from feb8125c72d23ae3d5aab49f2745ed25412d2c02)
diffstat:

 tryton/rpc.py |  3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r 0933248e1eff -r 9990c3ed2cfd tryton/rpc.py
--- a/tryton/rpc.py     Mon Oct 26 21:25:47 2020 +0100
+++ b/tryton/rpc.py     Mon Oct 26 21:28:47 2020 +0100
@@ -3,7 +3,6 @@
 import http.client
 import logging
 import socket
-import ssl
 import os
 try:
     from http import HTTPStatus
@@ -67,7 +66,7 @@
         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
 

Reply via email to