[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.
--- 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)
--- 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))