[views] fix ProcessInformationView: SESSION_MANAGER can be None (closes #5753280)
eg. with pyramid.
--- a/web/views/debug.py Thu Aug 06 15:21:58 2015 +0200
+++ b/web/views/debug.py Mon Jul 27 10:00:32 2015 +0200
@@ -132,8 +132,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: