diff options
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r-- | Objects/unicodeobject.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index b31675b496..a297cac4dd 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -5020,9 +5020,7 @@ PyObject *PyUnicode_Format(PyObject *format, case 'X': if (c == 'i') c = 'd'; - if (PyLong_Check(v) && PyLong_AsLong(v) == -1 - && PyErr_Occurred()) { - PyErr_Clear(); + if (PyLong_Check(v)) { temp = formatlong(v, flags, prec, c); if (!temp) goto onError; |