[adapters] enhanced warning
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 11 Jun 2010 07:58:49 +0200
changeset 5725 b5d595b66c35
parent 5724 a39ecb0e6d99
child 5726 c3b99606644d
[adapters] enhanced warning
view.py
--- a/view.py	Thu Jun 10 18:44:03 2010 +0200
+++ b/view.py	Fri Jun 11 07:58:49 2010 +0200
@@ -34,6 +34,7 @@
 from cubicweb.appobject import AppObject
 from cubicweb.utils import UStringIO, HTMLStream
 from cubicweb.schema import display_name
+from cubicweb.vregistry import classid
 
 # robots control
 NOINDEX = u'<meta name="ROBOTS" content="NOINDEX" />'
@@ -555,7 +556,7 @@
             if hasattr(entity, func.__name__):
                 warn('[3.9] %s method is deprecated, define it on a custom '
                      '%s for %s instead' % (func.__name__, iface,
-                                            entity.__class__),
+                                            classid(entity.__class__)),
                      DeprecationWarning)
                 member = getattr(entity, func.__name__)
                 if callable(member):