summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2000-11-30 05:22:44 (GMT)
committerTim Peters <tim.peters@gmail.com>2000-11-30 05:22:44 (GMT)
commita3a3a030af8579bdd0d3a8d293ee60a1ec8107dc (patch)
tree49d4db03e89d032c9ae7d8a606574392c34aed9b /Objects/unicodeobject.c
parent469d5bb0b4ca8008f271c4425236292b8a55afd6 (diff)
downloadcpython-a3a3a030af8579bdd0d3a8d293ee60a1ec8107dc.zip
cpython-a3a3a030af8579bdd0d3a8d293ee60a1ec8107dc.tar.gz
cpython-a3a3a030af8579bdd0d3a8d293ee60a1ec8107dc.tar.bz2
Fox for SF bug #123859: %[duxXo] long formats inconsistent.
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index b31675b..a297cac 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;