[pypy-commit] pypy default: backout c4296bb01a13, get_module_type_name is used for a reason
bdkearns
noreply at buildbot.pypy.org
Wed Apr 30 03:22:30 CEST 2014
Author: Brian Kearns <bdkearns at gmail.com>
Branch:
Changeset: r71082:c94a4ee2aa7d
Date: 2014-04-29 21:14 -0400
http://bitbucket.org/pypy/pypy/changeset/c94a4ee2aa7d/
Log: backout c4296bb01a13, get_module_type_name is used for a reason
diff --git a/pypy/interpreter/baseobjspace.py b/pypy/interpreter/baseobjspace.py
--- a/pypy/interpreter/baseobjspace.py
+++ b/pypy/interpreter/baseobjspace.py
@@ -1415,10 +1415,10 @@
def _getarg_error(self, expected, w_obj):
if self.is_none(w_obj):
- e = oefmt(self.w_TypeError, "must be %s, not None", expected)
+ name = "None"
else:
- e = oefmt(self.w_TypeError, "must be %s, not %T", expected, w_obj)
- raise e
+ name = self.type(w_obj).get_module_type_name()
+ raise oefmt(self.w_TypeError, "must be %s, not %s", expected, name)
@specialize.arg(1)
def getarg_w(self, code, w_obj):
More information about the pypy-commit
mailing list