def is_ready_for_command(self, timeout=0):
        """
        Return True if the socket is ready to send a command,
        otherwise False.

        Automatically retries EINTR errors based on PEP 475.
        """
        while True:
            try:
                return self.check_is_ready_for_command(timeout)
            except (select.error, IOError) as ex:
                if self.errno_from_exception(ex) == errno.EINTR:
                    continue
                return False
Return True if the socket is ready to send a command,
        otherwise False.

        Automatically retries EINTR errors based on PEP 475.