pass
-class CertificateError(Error):
- """Raised when a problem is found with the SSL certificate.
-
- """
- pass
-
-
class GanetiApiError(Error):
"""Generic error raised from Ganeti API.
self.code = code
+class CertificateError(GanetiApiError):
+ """Raised when a problem is found with the SSL certificate.
+
+ """
+ pass
+
+
def _AppendIf(container, condition, value):
"""Appends to a list if a condition evaluates to truth.
curl.perform()
except pycurl.error, err:
if err.args[0] in _CURL_SSL_CERT_ERRORS:
- raise CertificateError("SSL certificate error %s" % err)
+ raise CertificateError("SSL certificate error %s" % err,
+ code=err.args[0])
raise GanetiApiError(str(err), code=err.args[0])
finally: