[PATCH] Unbreak TTY ui on python 2.4

Sebastian Spaeth Sebastian at SSpaeth.de
Mon Feb 7 12:45:45 GMT 2011


I broke the TTY ui on python 2.4 in commit 35dd2361 by using
currentThread().name which isn't available on python 2.4 yet. This patch
uses the old API .getName() instead which is still available in at least
python 2.7 (not sure about python 3).

It's time to move off python 2.4 people :)

Signed-off-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
---
 offlineimap/ui/TTY.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/offlineimap/ui/TTY.py b/offlineimap/ui/TTY.py
index 4c574b2..e27d499 100644
--- a/offlineimap/ui/TTY.py
+++ b/offlineimap/ui/TTY.py
@@ -37,7 +37,7 @@ class TTYUI(UIBase):
             #if the next output comes from a different thread than our last one
             #add the info.
             #Most look like 'account sync foo' or 'Folder sync foo'.
-            threadname = currentThread().name
+            threadname = currentThread().getName()
             if (threadname == s._lastThreaddisplay):
                 print " %s" % msg
             else:
-- 
1.7.1





More information about the OfflineIMAP-project mailing list