assert we are not already shutting down
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 03 Mar 2010 19:03:52 +0100
changeset 4776 3bf51379baee
parent 4775 3a37f0ce7527
child 4777 7e37cb866e97
assert we are not already shutting down
server/repository.py
--- a/server/repository.py	Wed Mar 03 19:02:36 2010 +0100
+++ b/server/repository.py	Wed Mar 03 19:03:52 2010 +0100
@@ -349,6 +349,7 @@
         """called on server stop event to properly close opened sessions and
         connections
         """
+        assert not self._shutting_down, 'already shutting down'
         self._shutting_down = True
         if isinstance(self._looping_tasks, tuple): # if tasks have been started
             for looptask in self._looping_tasks: