From 72d05bac099f3614b2ddfe627d633475673444bb Mon Sep 17 00:00:00 2001 From: Nicolas Sebrecht Date: Fri, 18 Feb 2011 20:00:19 +0100 Subject: [PATCH] restore compatibilty with python 2.5 for ui TTY threading.currentThread() used an accessor to get its name. Signed-off-by: Nicolas Sebrecht --- Changelog.draft.rst | 2 ++ offlineimap/ui/TTY.py | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Changelog.draft.rst b/Changelog.draft.rst index 8b599f9..ba9de28 100644 --- a/Changelog.draft.rst +++ b/Changelog.draft.rst @@ -19,6 +19,8 @@ Changes Bug Fixes --------- +* Restore compatibiliy with python 2.5. + Pending for the next major release ================================== diff --git a/offlineimap/ui/TTY.py b/offlineimap/ui/TTY.py index 4c574b2..ee18dfa 100644 --- a/offlineimap/ui/TTY.py +++ b/offlineimap/ui/TTY.py @@ -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: