server/repository.py
branchstable
changeset 4946 2654cd5c87e0
parent 4862 0d0e5279f65e
child 4951 7dc54e12c606
child 4973 1e6536afa855
--- a/server/repository.py	Thu Mar 18 17:16:17 2010 +0100
+++ b/server/repository.py	Thu Mar 18 17:33:03 2010 +0100
@@ -338,7 +338,8 @@
             self.info('waiting thread %s...', thread.name)
             thread.join()
             self.info('thread %s finished', thread.name)
-        self.hm.call_hooks('server_shutdown', repo=self)
+        if not (self.config.creating or self.config.repairing):
+            self.hm.call_hooks('server_shutdown', repo=self)
         self.close_sessions()
         while not self._available_pools.empty():
             pool = self._available_pools.get_nowait()