[Python-checkins] python/dist/src/Python exceptions.c,1.38,1.39

gvanrossum@users.sourceforge.net gvanrossum@users.sourceforge.net
Tue, 17 Sep 2002 21:06:34 -0700


Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv9810

Modified Files:
	exceptions.c 
Log Message:
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).


Index: exceptions.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/exceptions.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** exceptions.c	3 Sep 2002 20:24:07 -0000	1.38
--- exceptions.c	18 Sep 2002 04:06:32 -0000	1.39
***************
*** 289,292 ****
--- 289,295 ----
  	break;
      }
+     case -1:
+         PyErr_Clear();
+         /* Fall through */
      default:
          out = PyObject_Str(args);