Stephane Bortzmeyer <[email protected]> writes: > I use python-gnutls <http://pypi.python.org/pypi/python-gnutls> and it > does not seem to have a dedicated mailing list, so I try here. > > The atatched code test1.py runs fine but a small modification, adding > a timeout to the socket (test-timeout.py) crashes with: > > Traceback (most recent call last): > File "test-timeout.py", line 20, in <module> > session.handshake() > File "/var/lib/python-support/python2.5/gnutls/connection.py", line 370, in > handshake > gnutls_handshake(self._c_object) > File "/var/lib/python-support/python2.5/gnutls/library/errors.py", line 44, > in _check_status > raise OperationWouldBlock(gnutls_strerror(retcode)) > gnutls.errors.OperationWouldBlock: Function was interrupted.
I suspect this means one of two things: 1) The timeout was reached. 2) The socket is in non-blocking mode, and then you need to call the gnutls_handshake function repeatedly until it either returns successfully, or fails, or the timeout is reached. I dont know whether the python-gnutls wrapper is expected to do this or whether your python application code is expected to do it. /Simon _______________________________________________ Help-gnutls mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gnutls
