[issue8573] Buggy _strerror in asyncore

Giampaolo Rodola' report at bugs.python.org
Thu Apr 29 23:24:41 CEST 2010


Giampaolo Rodola' <g.rodola at gmail.com> added the comment:

Good catch. I modified your patch a little bit including a catch for OverflowError exception and a last attempt to look up into errno.errorcode:

def _strerror(err):
    try:
        return strerror(err)
    except (ValueError, OverflowError):
        if err in errorcode:
            return errorcode[err]
        return "Unknown error %s" %err

Josiah, what do you think?

----------
assignee:  -> giampaolo.rodola
keywords: +easy
versions: +Python 2.7, Python 3.1, Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8573>
_______________________________________


More information about the Python-bugs-list mailing list