# HG changeset patch # User Sylvain Thénault # Date 1464793473 -7200 # Node ID 45c38bd3e96df2ba57fd028f782e83cec0fb8bef # Parent 6563113b9cafded981cf4ce5a563ab267b9d8c82 Take care that cnx may not be set in error view diff -r 6563113b9caf -r 45c38bd3e96d cubicweb/web/views/management.py --- a/cubicweb/web/views/management.py Wed Oct 12 10:59:18 2016 +0200 +++ b/cubicweb/web/views/management.py Wed Jun 01 17:04:33 2016 +0200 @@ -137,17 +137,18 @@ # if excinfo is not None, it's probably not a bug if excinfo is None: return - vcconf = self._cw.cnx.repo.get_versions() - w(u"
") - eversion = vcconf.get('cubicweb', self._cw._('no version information')) - # NOTE: tuple wrapping needed since eversion is itself a tuple - w(u"CubicWeb version: %s
\n" % (eversion,)) - cversions = [] - for cube in self._cw.vreg.config.cubes(): - cubeversion = vcconf.get(cube, self._cw._('no version information')) - w(u"Cube %s version: %s
\n" % (cube, cubeversion)) - cversions.append((cube, cubeversion)) - w(u"
") + if self._cw.cnx: + vcconf = self._cw.cnx.repo.get_versions() + w(u"
") + eversion = vcconf.get('cubicweb', self._cw._('no version information')) + # NOTE: tuple wrapping needed since eversion is itself a tuple + w(u"CubicWeb version: %s
\n" % (eversion,)) + cversions = [] + for cube in self._cw.vreg.config.cubes(): + cubeversion = vcconf.get(cube, self._cw._('no version information')) + w(u"Cube %s version: %s
\n" % (cube, cubeversion)) + cversions.append((cube, cubeversion)) + w(u"
") # creates a bug submission link if submit-mail is set if self._cw.vreg.config['submit-mail']: form = self._cw.vreg['forms'].select('base', self._cw, rset=None,