[views] fix ProcessInformationView: SESSION_MANAGER can be None (closes #5753280)
eg. with pyramid.
(grafted from 6a07c2dc3d85f4de0cf48221607e02c4473e11e4)
--- a/web/views/debug.py Tue Oct 06 18:59:01 2015 +0200
+++ b/web/views/debug.py Mon Jul 27 10:00:32 2015 +0200
@@ -126,8 +126,8 @@
w(u'<tr><th align="left">%s</th><td>%s</td></tr>' % (
_('data directory url'), req.datadir_url))
w(u'</table>')
- if req.user.is_in_group('managers'):
- from cubicweb.web.application import SESSION_MANAGER
+ from cubicweb.web.application import SESSION_MANAGER
+ if SESSION_MANAGER is not None and req.user.is_in_group('managers'):
sessions = SESSION_MANAGER.current_sessions()
w(u'<h3>%s</h3>' % _('opened web sessions'))
if sessions: