Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, validate=False, ca_certs=None, **kwargs):
super(GelfTlsHandler, self).__init__(**kwargs)
if validate and ca_certs is None:
raise ValueError('CA bundle file path must be specified')
self.ca_certs = ca_certs
self.reqs = ssl.CERT_REQUIRED if validate else ssl.CERT_NONE