add another way to get errno from exception
This commit is contained in:
parent
53c31a53b6
commit
4a469d2ae6
|
@ -63,7 +63,7 @@ class SSLWrapper:
|
|||
peer=None):
|
||||
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')
|
||||
if not isinstance(strerror, basestring):
|
||||
strerror = repr(strerror)
|
||||
|
|
Loading…
Reference in New Issue