Author: Brian Kearns <[email protected]>
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):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit