[pypy-commit] pypy stm-gc: hg merge default
arigo
noreply at buildbot.pypy.org
Fri Apr 20 10:43:05 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch: stm-gc
Changeset: r54559:a144a7717de1
Date: 2012-04-20 08:04 +0200
http://bitbucket.org/pypy/pypy/changeset/a144a7717de1/
Log: hg merge default
diff --git a/pypy/interpreter/function.py b/pypy/interpreter/function.py
--- a/pypy/interpreter/function.py
+++ b/pypy/interpreter/function.py
@@ -49,7 +49,9 @@
def __repr__(self):
# return "function %s.%s" % (self.space, self.name)
# maybe we want this shorter:
- name = getattr(self, 'name', '?')
+ name = getattr(self, 'name', None)
+ if not isinstance(name, str):
+ name = '?'
return "<%s %s>" % (self.__class__.__name__, name)
def call_args(self, args):
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):
diff --git a/pypy/objspace/std/model.py b/pypy/objspace/std/model.py
--- a/pypy/objspace/std/model.py
+++ b/pypy/objspace/std/model.py
@@ -378,7 +378,10 @@
__slots__ = ()
def __repr__(self):
- s = '%s(%s)' % (self.__class__.__name__, getattr(self, 'name', ''))
+ name = getattr(self, 'name', '')
+ if not isinstance(name, str):
+ name = ''
+ s = '%s(%s)' % (self.__class__.__name__, name)
w_cls = getattr(self, 'w__class__', None)
if w_cls is not None and w_cls is not self:
s += ' instance of %s' % self.w__class__
More information about the pypy-commit
mailing list