diff Python/exceptions.c @ 25320:14ad560f4a97 legacy-trunk

Fix SF bug 610610 (reported by Martijn Pieters, diagnosed by Neal Norwitz). The switch in Exception__str__ didn't clear the error if PySequence_Size() raised an exception. Added a case -1 which clears the error and falls through to the default case. Definite backport candidate (this dates all the way to Python 2.0).
author Guido van Rossum <guido@python.org>
date Wed, 18 Sep 2002 04:06:32 +0000
parents 0401a0ead1eb
children 6b62ab8485eb
line wrap: on
line diff
--- a/Python/exceptions.c	Wed Sep 18 03:30:12 2002 +0000
+++ b/Python/exceptions.c	Wed Sep 18 04:06:32 2002 +0000
@@ -288,6 +288,9 @@
 	    out = NULL;
 	break;
     }
+    case -1:
+        PyErr_Clear();
+        /* Fall through */
     default:
         out = PyObject_Str(args);
         break;