# HG changeset patch # User Alexandre Fayolle # Date 1271965076 0 # Node ID 2c3f14bc25904a4e980539375aafef15e53acb92 # Parent 962e13ab09308ce496ac7b80008917422f433ffb [python2.6] don't add a name property on Thread in Python2.6 the threading.Thread class has a name attribute (used to be __name). The old code would trigger a infinite recursion. diff -r 962e13ab0930 -r 2c3f14bc2590 server/repository.py --- a/server/repository.py Thu Apr 22 18:25:34 2010 +0200 +++ b/server/repository.py Thu Apr 22 19:37:56 2010 +0000 @@ -320,9 +320,9 @@ looptask.join() self.info('task %s finished', looptask.name) for thread in self._running_threads: - self.info('waiting thread %s...', thread.name) + self.info('waiting thread %s...', thread.getName()) thread.join() - self.info('thread %s finished', thread.name) + self.info('thread %s finished', thread.getName()) if not (self.config.creating or self.config.repairing or self.config.quick_start): self.hm.call_hooks('server_shutdown', repo=self) diff -r 962e13ab0930 -r 2c3f14bc2590 server/utils.py --- a/server/utils.py Thu Apr 22 18:25:34 2010 +0200 +++ b/server/utils.py Thu Apr 22 19:37:56 2010 +0000 @@ -152,6 +152,5 @@ self.daemon = True Thread.start(self) - @property - def name(self): + def getName(self): return '%s(%s)' % (self._name, Thread.getName(self))