server/repository.py
branchstable
changeset 7573 c8f8762c986d
parent 7550 183a61d1bab9
child 7574 34154f48d255
child 7616 8837e4733888
--- a/server/repository.py	Wed Jun 29 15:50:26 2011 +0200
+++ b/server/repository.py	Wed Jun 29 16:02:24 2011 +0200
@@ -55,7 +55,7 @@
                       BadConnectionId, Unauthorized, ValidationError,
                       RepositoryError, UniqueTogetherError, typed_eid, onevent)
 from cubicweb import cwvreg, schema, server
-from cubicweb.server import utils, hook, pool, querier, sources
+from cubicweb.server import ShuttingDown, utils, hook, pool, querier, sources
 from cubicweb.server.session import Session, InternalSession, InternalManager, \
      security_enabled
 from cubicweb.server.ssplanner import EditedEntity
@@ -940,7 +940,7 @@
                      checkshuttingdown=True):
         """return the user associated to the given session identifier"""
         if checkshuttingdown and self.shutting_down:
-            raise Exception('Repository is shutting down')
+            raise ShuttingDown('Repository is shutting down')
         try:
             session = self._sessions[sessionid]
         except KeyError: