summaryrefslogtreecommitdiffstats
path: root/Objects/stringobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/stringobject.c')
-rw-r--r--Objects/stringobject.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index 31d1b05..47da4ed 100644
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -2897,10 +2897,7 @@ PyString_Format(PyObject *format, PyObject *args)
case 'X':
if (c == 'i')
c = 'd';
- if (PyLong_Check(v) && PyLong_AsLong(v) == -1
- && PyErr_Occurred()) {
- /* Too big for a C long. */
- PyErr_Clear();
+ if (PyLong_Check(v)) {
temp = _PyString_FormatLong(v, flags,
prec, c, &pbuf, &len);
if (!temp)