[PATCHv2 2/3] String representation of a Folder is its name
Sebastian Spaeth
Sebastian at SSpaeth.de
Sun Mar 6 08:52:02 GMT 2011
This enables us to just use the folder instance in the ui output and get a name rather than having to call getname() all the time.
Signed-off-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
---
offlineimap/folder/Base.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/offlineimap/folder/Base.py b/offlineimap/folder/Base.py
index ecdde7a..8e73868 100644
--- a/offlineimap/folder/Base.py
+++ b/offlineimap/folder/Base.py
@@ -33,6 +33,9 @@ class BaseFolder:
"""Returns name"""
return self.name
+ def __str__(self):
+ return self.name
+
def suggeststhreads(self):
"""Returns true if this folder suggests using threads for actions;
false otherwise. Probably only IMAP will return true."""
--
1.7.1
More information about the OfflineIMAP-project
mailing list