add another way to get errno from exception

This commit is contained in:
Yann Leboulanger 2009-07-13 22:14:24 +02:00
parent 53c31a53b6
commit 4a469d2ae6
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ class SSLWrapper:
peer=None): peer=None):
self.parent = IOError self.parent = IOError
errno = errno or gattr(exc, 'errno') errno = errno or gattr(exc, 'errno') or exc[0]
strerror = strerror or gattr(exc, 'strerror') or gattr(exc, 'args') strerror = strerror or gattr(exc, 'strerror') or gattr(exc, 'args')
if not isinstance(strerror, basestring): if not isinstance(strerror, basestring):
strerror = repr(strerror) strerror = repr(strerror)