Example #1
0
 def sendall(self, data, flags=0):
     try:
         socket.sendall(self, data)
     except _socket_timeout as ex:
         if self.timeout == 0.0:
             # Python 2 simply *hangs* in this case, which is bad, but
             # Python 3 raises SSLWantWriteError. We do the same.
             raise SSLError(SSL_ERROR_WANT_WRITE)
         # Convert the socket.timeout back to the sslerror
         raise SSLError(*ex.args)
Example #2
0
 def sendall(self, data, flags=0):
     try:
         socket.sendall(self, data)
     except _socket_timeout as ex:
         if self.timeout == 0.0:
             # Python 2 simply *hangs* in this case, which is bad, but
             # Python 3 raises SSLWantWriteError. We do the same.
             raise SSLError(SSL_ERROR_WANT_WRITE)
         # Convert the socket.timeout back to the sslerror
         raise SSLError(*ex.args)
    def sendall(self, data, flags=0):
        self._checkClosed()
        self.__check_flags('sendall', flags)

        try:
            socket.sendall(self, data)
        except _socket_timeout as ex:
            if self.timeout == 0.0:
                # Python 2 simply *hangs* in this case, which is bad, but
                # Python 3 raises SSLWantWriteError. We do the same.
                raise SSLWantWriteError("The operation did not complete (write)")
            # Convert the socket.timeout back to the sslerror
            raise SSLError(*ex.args)
Example #4
0
    def sendall(self, data, flags=0):
        self._checkClosed()
        self.__check_flags('sendall', flags)

        try:
            socket.sendall(self, data)
        except _socket_timeout as ex:
            if self.timeout == 0.0:
                # Python 2 simply *hangs* in this case, which is bad, but
                # Python 3 raises SSLWantWriteError. We do the same.
                raise SSLWantWriteError("The operation did not complete (write)")
            # Convert the socket.timeout back to the sslerror
            raise SSLError(*ex.args)