def __init__(self, ssl_keyfile=None, ssl_certfile=None, ssl_cert_reqs=None, ssl_ca_certs=None, **kwargs):
    if (not ssl_available):
        raise RedisError("Python wasn't built with SSL support")
    super(SSLConnection, self).__init__(**kwargs)
    self.keyfile = ssl_keyfile
    self.certfile = ssl_certfile
    if (ssl_cert_reqs is None):
        ssl_cert_reqs = ssl.CERT_NONE
    elif isinstance(ssl_cert_reqs, basestring):
        CERT_REQS = {'none': ssl.CERT_NONE, 'optional': ssl.CERT_OPTIONAL, 'required': ssl.CERT_REQUIRED}
        if (ssl_cert_reqs not in CERT_REQS):
            raise RedisError(('Invalid SSL Certificate Requirements Flag: %s' % ssl_cert_reqs))
        ssl_cert_reqs = CERT_REQS[ssl_cert_reqs]
    self.cert_reqs = ssl_cert_reqs
    self.ca_certs = ssl_ca_certs
def __init__(self, ssl_keyfile=None, ssl_certfile=None, ssl_cert_reqs=None, ssl_ca_certs=None, **kwargs):
    if (not ssl_available):
        raise RedisError("Python wasn't built with SSL support")
    super(SSLConnection, self).__init__(**kwargs)
    self.keyfile = ssl_keyfile
    self.certfile = ssl_certfile
    if (ssl_cert_reqs is None):
        ssl_cert_reqs = ssl.CERT_NONE
    elif isinstance(ssl_cert_reqs, basestring):
        CERT_REQS = {'none': ssl.CERT_NONE, 'optional': ssl.CERT_OPTIONAL, 'required': ssl.CERT_REQUIRED}
        if (ssl_cert_reqs not in CERT_REQS):
            raise RedisError(('Invalid SSL Certificate Requirements Flag: %s' % ssl_cert_reqs))
        ssl_cert_reqs = CERT_REQS[ssl_cert_reqs]
    self.cert_reqs = ssl_cert_reqs
    self.ca_certs = ssl_ca_certs