web/views/debug.py
changeset 6582 8eb7883b4223
parent 6141 b8287e54b528
child 6961 686c59dfc401
--- a/web/views/debug.py	Thu Oct 21 18:38:36 2010 +0200
+++ b/web/views/debug.py	Fri Oct 22 09:15:35 2010 +0200
@@ -18,11 +18,13 @@
 """management and error screens"""
 
 __docformat__ = "restructuredtext en"
+_ = unicode
 
 from time import strftime, localtime
 
 from logilab.mtconverter import xml_escape
 
+from cubicweb import BadConnectionId
 from cubicweb.selectors import none_rset, match_user_groups
 from cubicweb.view import StartupView
 from cubicweb.web.views import actions
@@ -144,7 +146,7 @@
     cache_max_age = 0
 
     def call(self, **kwargs):
-        self.w(u'<h1>%s</h1>' % _("Registry's content"))
+        self.w(u'<h1>%s</h1>' % self._cw._("Registry's content"))
         keys = sorted(self._cw.vreg)
         url = xml_escape(self._cw.url())
         self.w(u'<p>%s</p>\n' % ' - '.join('<a href="%s#%s">%s</a>'
@@ -180,20 +182,20 @@
                          Connection, Cursor,
                          CubicWebRequestBase)
         try:
-            from cubicweb.server.session import Session, ChildSession, InternalSession
-            lookupclasses += (InternalSession, ChildSession, Session)
+            from cubicweb.server.session import Session, InternalSession
+            lookupclasses += (InternalSession, Session)
         except ImportError:
             pass # no server part installed
         self.w(u'<h1>%s</h1>' % _('Garbage collection information'))
         counters, ocounters, garbage = gc_info(lookupclasses,
                                                viewreferrersclasses=())
-        self.w(u'<h3>%s</h3>' % _('Looked up classes'))
+        self.w(u'<h3>%s</h3>' % self._cw._('Looked up classes'))
         values = sorted(counters.iteritems(), key=lambda x: x[1], reverse=True)
         self.wview('pyvaltable', pyvalue=values)
-        self.w(u'<h3>%s</h3>' % _('Most referenced classes'))
+        self.w(u'<h3>%s</h3>' % self._cw._('Most referenced classes'))
         values = sorted(ocounters.iteritems(), key=lambda x: x[1], reverse=True)
         self.wview('pyvaltable', pyvalue=values[:self._cw.form.get('nb', 20)])
         if garbage:
-            self.w(u'<h3>%s</h3>' % _('Unreachable objects'))
+            self.w(u'<h3>%s</h3>' % self._cw._('Unreachable objects'))
             values = sorted(xml_escape(repr(o)) for o in garbage)
             self.wview('pyvallist', pyvalue=values)