projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
31960db
)
err_ovf(): only raise OverflowError when OverflowWarning was raised.
author
Guido van Rossum
<guido@python.org>
Thu, 23 Aug 2001 21:32:40 +0000
(21:32 +0000)
committer
Guido van Rossum
<guido@python.org>
Thu, 23 Aug 2001 21:32:40 +0000
(21:32 +0000)
Objects/intobject.c
patch
|
blob
|
history
diff --git
a/Objects/intobject.c
b/Objects/intobject.c
index 847c74d33a3e333ec042a5286e5b8b02d3b0be19..77d7e387bd85828cc96e675e0821ce147c1c9357 100644
(file)
--- a/
Objects/intobject.c
+++ b/
Objects/intobject.c
@@
-27,7
+27,8
@@
static int
err_ovf(char *msg)
{
if (PyErr_Warn(PyExc_OverflowWarning, msg) < 0) {
- PyErr_SetString(PyExc_OverflowError, msg);
+ if (PyErr_ExceptionMatches(PyExc_OverflowWarning))
+ PyErr_SetString(PyExc_OverflowError, msg);
return 1;
}
else