summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Objects/object.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Objects/object.c b/Objects/object.c
index 46487de..0de095f 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -348,7 +348,10 @@ PyObject_GetAttrString(v, name)
}
if (v->ob_type->tp_getattr == NULL) {
- PyErr_SetString(PyExc_AttributeError, "attribute-less object");
+ PyErr_Format(PyExc_AttributeError,
+ "'%.50s' object has no attribute '%.400s'",
+ v->ob_type->tp_name,
+ name);
return NULL;
}
else {