[PATCH 2/4] Make str() of Account() be its name
Sebastian Spaeth
Sebastian at SSpaeth.de
Wed Apr 27 11:15:50 BST 2011
So we can simply hand an account instance to error messages rather than
having to call Account().getname() all the time.
This is not used yet.
Signed-off-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
---
offlineimap/accounts.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/offlineimap/accounts.py b/offlineimap/accounts.py
index 7edfa37..a22bf7f 100644
--- a/offlineimap/accounts.py
+++ b/offlineimap/accounts.py
@@ -125,6 +125,9 @@ class Account(CustomConfig.ConfigHelperMixin):
def getname(self):
return self.name
+ def __str__(self):
+ return self.name
+
def getsection(self):
return 'Account ' + self.getname()
--
1.7.4.1
More information about the OfflineIMAP-project
mailing list