[PATCH] fix broken ui Blinkenlights in multi-threaded mode

Nicolas Sebrecht nicolas.s-dev at laposte.net
Tue May 17 17:27:03 BST 2011


This is a regression introduced by commit d5493fe89420
[threadutil: explicitly import get_ident from thread].

The threadid attribute was wrongly removed from the ExitNotifyThread class.
Restore it.

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev at laposte.net>
---
 offlineimap/threadutil.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/offlineimap/threadutil.py b/offlineimap/threadutil.py
index 155a563..bb3b63c 100644
--- a/offlineimap/threadutil.py
+++ b/offlineimap/threadutil.py
@@ -134,6 +134,7 @@ class ExitNotifyThread(Thread):
     exited and to provide for the ability for it to find out why."""
     def run(self):
         global exitthreads, profiledir
+        self.threadid = get_ident()
         try:
             if not profiledir:          # normal case
                 Thread.run(self)
@@ -148,7 +149,7 @@ class ExitNotifyThread(Thread):
                 except SystemExit:
                     pass
                 prof.dump_stats( \
-                            profiledir + "/" + str(get_ident()) + "_" + \
+                            profiledir + "/" + str(self.threadid) + "_" + \
                             self.getName() + ".prof")
         except:
             self.setExitCause('EXCEPTION')
-- 
1.7.5.1.354.g761178





More information about the OfflineIMAP-project mailing list