Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_connection(self):
if self.host:
return HTTPSConnection(self.host, self.port)
return UnixHTTPConnection(self.unix_socket)