[Python-checkins] r72520 - in python/branches/py3k: Objects/abstract.c

benjamin.peterson python-checkins at python.org
Sat May 9 21:24:36 CEST 2009


Author: benjamin.peterson
Date: Sat May  9 21:24:36 2009
New Revision: 72520

Log:
Merged revisions 72518 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r72518 | benjamin.peterson | 2009-05-09 14:18:36 -0500 (Sat, 09 May 2009) | 1 line
  
  clear error state properly
........


Modified:
   python/branches/py3k/   (props changed)
   python/branches/py3k/Objects/abstract.c

Modified: python/branches/py3k/Objects/abstract.c
==============================================================================
--- python/branches/py3k/Objects/abstract.c	(original)
+++ python/branches/py3k/Objects/abstract.c	Sat May  9 21:24:36 2009
@@ -98,6 +98,7 @@
 	if (ro == NULL) {
 		if (!PyErr_ExceptionMatches(PyExc_TypeError))
 			return -1;
+		PyErr_Clear();
 		return defaultvalue;
 	}
 	rv = PyLong_Check(ro) ? PyLong_AsSsize_t(ro) : defaultvalue;


More information about the Python-checkins mailing list