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
This commit is contained in:
Cédric Krier committed 2020-10-26 21:28:47 +01:00
1 parent 7ce2b36381
commit ca4318754d
1 file changed
+1 -2
+1 -2
View File
@@ -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