From 75ba922eb2955794cda5a4bf91d2a729e39a13ce Mon Sep 17 00:00:00 2001 From: Nicholas Brown Date: Tue, 18 Feb 2020 17:35:29 +0000 Subject: [PATCH] custom exception if importing m2crypto fails fixes #743 --- osc/babysitter.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/osc/babysitter.py b/osc/babysitter.py index 437537a4..b68b330d 100644 --- a/osc/babysitter.py +++ b/osc/babysitter.py @@ -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