This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author giampaolo.rodola
Recipients giampaolo.rodola
Date 2018-05-26.11:06:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1527332786.28.0.682650639539.issue33653@psf.upfronthosting.co.za>
In-reply-to
Content
>>> import errno
>>> OSError(errno.EBADF).errno
>>> OSError(errno.EBADF, "yo").errno
9
>>> IOError(errno.EBADF).errno
>>> IOError(errno.EBADF, "yo").errno
9
>>> EnvironmentError(errno.EBADF).errno
>>> 
>>> EnvironmentError(errno.EBADF, "yo").errno
9

This is a bit annoying mainly when mocking fs-related functions in order to raise specific OSError exceptions.
History
Date User Action Args
2018-05-26 11:06:26giampaolo.rodolasetrecipients: + giampaolo.rodola
2018-05-26 11:06:26giampaolo.rodolasetmessageid: <1527332786.28.0.682650639539.issue33653@psf.upfronthosting.co.za>
2018-05-26 11:06:26giampaolo.rodolalinkissue33653 messages
2018-05-26 11:06:26giampaolo.rodolacreate