def __getattr__(self, name):
        """
        Look up attributes on the wrapped socket object if they are not found
        on the Connection object.
        """
        if self._socket is None:
            raise AttributeError("'%s' object has no attribute '%s'" % (
                self.__class__.__name__, name
            ))
        else:
            return getattr(self._socket, name)

        Look up attributes on the wrapped socket object if they are not found
        on the Connection object.
        
stackoverflow/venv/lib/python3.6/site-packages/OpenSSL/SSL.py