Skip to content

Commit

Permalink
Use correct format char when creating overflow exception.
Browse files Browse the repository at this point in the history
(cherry picked from commit c365ec2)
  • Loading branch information
RobinD42 committed Aug 5, 2018
1 parent 6b1b095 commit b80e3f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sip/siplib/siplib.c
Expand Up @@ -5366,17 +5366,17 @@ static int parsePass1(PyObject **parseErrp, sipSimpleWrapper **selfp,
PyErr_Format(PyExc_OverflowError, "argument %d overflowed: %S",
failure.arg_nr, failure.detail_obj);
#else
PyErr_Format(PyExc_OverflowError, "argument %s overflowed: %s",
PyErr_Format(PyExc_OverflowError, "argument %d overflowed: %s",
failure.arg_nr, exc_str);
#endif
}
else
{
#if PY_MAJOR_VERSION >= 3
PyErr_Format(PyExc_OverflowError, "argument '%s' overflowed: %S",
PyErr_Format(PyExc_OverflowError, "argument '%d' overflowed: %S",
failure.arg_nr, failure.detail_obj);
#else
PyErr_Format(PyExc_OverflowError, "argument '%s' overflowed: %s",
PyErr_Format(PyExc_OverflowError, "argument '%d' overflowed: %s",
failure.arg_nr, exc_str);
#endif
}
Expand Down

0 comments on commit b80e3f0

Please sign in to comment.