[issue39673] TimeoutError

YoSTEALTH report at bugs.python.org
Tue Feb 18 05:04:36 EST 2020


YoSTEALTH <ritesh at stealthcentral.com> added the comment:

Since I provide `OSError` with appropriate `errono`, it raises that error for example:

import os


try:
    no = -11
    raise OSError(-no, os.strerror(-no))
except BlockingIOError as e:
    print('Success:', e)
    # Success: [Errno 11] Resource temporarily unavailable
except OSError as e:
    print('Failed:', e)

should work the same to raise `TimeoutError` as well

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39673>
_______________________________________


More information about the Python-bugs-list mailing list