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 loewis
Recipients christian.heimes, loewis, serhiy.storchaka
Date 2012-09-17.12:35:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1347885318.78.0.217739906444.issue15954@psf.upfronthosting.co.za>
In-reply-to
Content
> I don't know what exception type should be used here: 
> OSError with an errno EINVAL or some specialized type. 

No, I think the appropriate error is ValueError, at least if errno is EINVAL.

> because I don't know under what conditions it would be possible error

AFAICT, glibc never sets errno. 

msvcrt gives EILSEQ or ERANGE, but never EINVAL. EILSEQ is returned if LCMapString failed, and ERANE if the output buffer is too small. In either case, the result is INT_MAX.
History
Date User Action Args
2012-09-17 12:35:18loewissetrecipients: + loewis, christian.heimes, serhiy.storchaka
2012-09-17 12:35:18loewissetmessageid: <1347885318.78.0.217739906444.issue15954@psf.upfronthosting.co.za>
2012-09-17 12:35:18loewislinkissue15954 messages
2012-09-17 12:35:18loewiscreate