1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-09-20 01:06:17 +02: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