1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 06:46:15 +01:00

Merge branch 'm2crypto_exceptions' of https://github.com/nickbroon/osc

The babysitter module sets SSLError and SSLVerificationError to None, if
m2crypto is, for instance, missing. This works in python2 but breaks in
python3. Hence, both should be classes that inherit from Exception.
This commit is contained in:
Marcus Huewe 2020-02-18 19:41:18 +01:00
commit 80c9b6e3df

View File

@ -22,8 +22,10 @@ try:
from M2Crypto.SSL.Checker import SSLVerificationError
from M2Crypto.SSL import SSLError as SSLError
except:
SSLError = None
SSLVerificationError = None
class SSLError(Exception):
pass
class SSLVerificationError(Exception):
pass
try:
# import as RPMError because the class "error" is too generic