mirror of
https://github.com/python/cpython.git
synced 2025-08-18 07:41:05 +00:00
Merged revisions 81294 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r81294 | giampaolo.rodola | 2010-05-18 22:04:31 +0200 (mar, 18 mag 2010) | 1 line Fix issue #8573 (asyncore._strerror bug): fixed os.strerror typo; included NameError in the tuple of expected exception; added test case for asyncore._strerror. ........
This commit is contained in:
parent
4d1dc6125a
commit
30aa46c910
2 changed files with 11 additions and 2 deletions
|
@ -62,8 +62,8 @@ except NameError:
|
|||
|
||||
def _strerror(err):
|
||||
try:
|
||||
return strerror(err)
|
||||
except (ValueError, OverflowError):
|
||||
return os.strerror(err)
|
||||
except (ValueError, OverflowError, NameError):
|
||||
if err in errorcode:
|
||||
return errorcode[err]
|
||||
return "Unknown error %s" %err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue