[pypy-commit] pypy default: Ignore PyErr_SetInterrupt() if no 'signal' module.
arigo
noreply at buildbot.pypy.org
Fri Apr 20 10:43:04 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r54558:f4977370180a
Date: 2012-04-20 08:04 +0200
http://bitbucket.org/pypy/pypy/changeset/f4977370180a/
Log: Ignore PyErr_SetInterrupt() if no 'signal' module.
diff --git a/pypy/module/cpyext/pyerrors.py b/pypy/module/cpyext/pyerrors.py
--- a/pypy/module/cpyext/pyerrors.py
+++ b/pypy/module/cpyext/pyerrors.py
@@ -314,7 +314,10 @@
"""This function simulates the effect of a SIGINT signal arriving --- the
next time PyErr_CheckSignals() is called, KeyboardInterrupt will be raised.
It may be called without holding the interpreter lock."""
- space.check_signal_action.set_interrupt()
+ if space.check_signal_action is not None:
+ space.check_signal_action.set_interrupt()
+ #else:
+ # no 'signal' module present, ignore... We can't return an error here
@cpython_api([PyObjectP, PyObjectP, PyObjectP], lltype.Void)
def PyErr_GetExcInfo(space, ptype, pvalue, ptraceback):
More information about the pypy-commit
mailing list