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 eryksun
Recipients David.Edelsohn, belopolsky, eryksun, larry, serhiy.storchaka, steve.dower, vstinner
Date 2015-09-08.15:25:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1441725946.65.0.378260442417.issue25029@psf.upfronthosting.co.za>
In-reply-to
Content
Steve, it seems to me that for MSVC the EINVAL test should come first:
   
    _Py_BEGIN_SUPPRESS_IPH
    olderr = errno;
    errno = 0;
    buflen = format_time(outbuf, i, fmt, &buf);
    err = errno;
    errno = olderr;
    _Py_END_SUPPRESS_IPH
    
    if (buflen == 0 && err == EINVAL) {
        PyErr_SetString(PyExc_ValueError, "Invalid format string");
        break;
    }

Then the old test could be restored, i.e. (buflen > 0 || i >= 256 * fmtlen).
History
Date User Action Args
2015-09-08 15:25:46eryksunsetrecipients: + eryksun, belopolsky, vstinner, larry, serhiy.storchaka, steve.dower, David.Edelsohn
2015-09-08 15:25:46eryksunsetmessageid: <1441725946.65.0.378260442417.issue25029@psf.upfronthosting.co.za>
2015-09-08 15:25:46eryksunlinkissue25029 messages
2015-09-08 15:25:46eryksuncreate