server/repository.py
changeset 4951 7dc54e12c606
parent 4913 083b4d454192
parent 4946 2654cd5c87e0
child 4958 665eacdd8c50
--- a/server/repository.py	Thu Mar 18 17:31:22 2010 +0100
+++ b/server/repository.py	Thu Mar 18 17:39:17 2010 +0100
@@ -335,7 +335,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()