1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-27 07:06:13 +01:00

custom exception if importing m2crypto fails

fixes #743
This commit is contained in:
Nicholas Brown 2020-02-18 17:35:29 +00:00
parent 5185026084
commit 75ba922eb2

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