def make_connection(self, host): try: if self._scheme == 'http': return Transport.make_connection(self, host) return SafeTransport.make_connection(self, host) except socket.error, e: raise ProtocolError(host, -1, "Could not connect to server", None)
def make_connection(self, host): self.host = host if self.proxy: host = self.proxy.split('://', 1)[-1] if self.https: c = SafeTransport.make_connection(self, host) else: c = Transport.make_connection(self, host) c.timeout = self.timeout return c
def make_connection(self, host): """Create the connection for the transport and save it.""" self.conn = SafeTransport.make_connection(self, host) return self.conn
def make_connection(self, host): c = SafeTransport.make_connection(self, host) c.timeout = self.timeout return c
def make_connection(self,host): host_with_cert = (host, { 'key_file' : self.__key_file, 'cert_file' : self.__cert_file }) return SafeTransport.make_connection(self,host_with_cert)