New submission from Antoine Pitrou <pit...@free.fr>: Treating RuntimeError as if it could take an errno is no good:
>>> try: signal.siginterrupt(32, 12345) ... except RuntimeError as e: print(e.errno) ... Traceback (most recent call last): File "<stdin>", line 1, in <module> RuntimeError: (22, 'Invalid argument') During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 2, in <module> AttributeError: 'RuntimeError' object has no attribute 'errno' Changing it breaks compatibility a bit but I think it's worth it. ---------- components: Library (Lib) messages: 135243 nosy: haypo, ncoghlan, pitrou priority: normal severity: normal stage: needs patch status: open title: The signal module should raise OSError for OS-related exceptions, not RuntimeError type: behavior versions: Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12011> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com