+ # Handle SSL errors
+ if isinstance(e.reason, ssl.SSLError):
+ e = e.reason
+
+ if e.reason == "CERTIFICATE_VERIFY_FAILED":
+ raise DDNSCertificateError
+
+ # Raise all other SSL errors
+ raise DDNSSSLError(e.reason)
+
+ # Name or service not known
+ if e.reason.errno == -2:
+ raise DDNSResolveError
+