(self, timeout=1)
return result
A factory method which allows subclasses to define the precise
        type of socket they want.
A factory method which allows subclasses to define the precise
        type of socket they want.
A factory method which allows subclasses to define the precise type of socket they want .
def makeSocket(self, timeout=1):
        """
        A factory method which allows subclasses to define the precise
        type of socket they want.
        """
        if self.port is not None:
            result = socket.create_connection(self.address, timeout=timeout)
        else:
            result = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
            result.settimeout(timeout)
            try:
                result.connect(self.address)
            except OSError:
                result.close()  # Issue 19182
                raise
        return result
def makeSocket ( self , timeout = 1 ) : if self . port is not None : result = socket . create_connection ( self . address , timeout = timeout ) else : result = socket . socket ( socket . AF_UNIX , socket . SOCK_STREAM ) result . settimeout ( timeout ) try : result . connect ( self . address ) except OSError : result . close ( ) # Issue 19182 raise return result