get errornum correctly in SSLWrapperError exceptions

This commit is contained in:
Yann Leboulanger 2009-07-13 17:44:47 +02:00
parent 711dfce03c
commit 2bd1e1410d
1 changed files with 1 additions and 1 deletions

View File

@ -535,7 +535,7 @@ class NonBlockingTCP(NonBlockingTransport, IdleObject):
except tls_nb.SSLWrapper.Error, e: except tls_nb.SSLWrapper.Error, e:
log.info("_do_receive, caught SSL error, got %s:" % received, log.info("_do_receive, caught SSL error, got %s:" % received,
exc_info=True) exc_info=True)
errnum, errstr = e.exc errnum, errstr = e.errno, e.strerror
if received == '': if received == '':
errstr = 'zero bytes on recv' errstr = 'zero bytes on recv'