# HG changeset patch # User Sylvain Thénault # Date 1243328483 -7200 # Node ID 67e7379edd968450b954c28a952fcc8201bc1efd # Parent fc702ea02b25d72420f2a56c384d589c8551f011 #343379: disturbing message on upgrade diff -r fc702ea02b25 -r 67e7379edd96 server/repository.py --- a/server/repository.py Tue May 26 09:31:15 2009 +0200 +++ b/server/repository.py Tue May 26 11:01:23 2009 +0200 @@ -636,9 +636,10 @@ self.exception('unexpected error') raise - def close(self, sessionid): + def close(self, sessionid, checkshuttingdown=True): """close the session with the given id""" - session = self._get_session(sessionid, setpool=True) + session = self._get_session(sessionid, setpool=True, + checkshuttingdown=checkshuttingdown) # operation uncommited before close are rollbacked before hook is called session.rollback() self.hm.call_hooks('session_close', session=session) @@ -691,7 +692,7 @@ """close every opened sessions""" for sessionid in self._sessions.keys(): try: - self.close(sessionid) + self.close(sessionid, checkshuttingdown=False) except: self.exception('error while closing session %s' % sessionid) @@ -720,9 +721,9 @@ session.set_pool() return session - def _get_session(self, sessionid, setpool=False): + def _get_session(self, sessionid, setpool=False, checkshuttingdown=True): """return the user associated to the given session identifier""" - if self._shutting_down: + if checkshuttingdown and self._shutting_down: raise Exception('Repository is shutting down') try: session = self._sessions[sessionid]