1
0
mirror of https://github.com/OfflineIMAP/offlineimap.git synced 2024-06-26 07:29:03 +02:00

restore compatibilty with python 2.5 for ui TTY

threading.currentThread() used an accessor to get its name.

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Nicolas Sebrecht 2011-02-18 20:00:19 +01:00
parent 45e0b233a5
commit 72d05bac09
2 changed files with 6 additions and 1 deletions

View File

@ -19,6 +19,8 @@ Changes
Bug Fixes
---------
* Restore compatibiliy with python 2.5.
Pending for the next major release
==================================

View File

@ -37,7 +37,10 @@ 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
try:
threadname = currentThread().name
except AttributeError:
threadname = currentThread().getName()
if (threadname == s._lastThreaddisplay):
print " %s" % msg
else: