[PATCH 11/17] Prettify uidexists() function a bit

Sebastian Spaeth Sebastian at SSpaeth.de
Mon Nov 29 16:02:19 GMT 2010


No functional change

Signed-off-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
---
 offlineimap/folder/Base.py |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/offlineimap/folder/Base.py b/offlineimap/folder/Base.py
index e7ad22d..897bb54 100644
--- a/offlineimap/folder/Base.py
+++ b/offlineimap/folder/Base.py
@@ -142,13 +142,10 @@ class BaseFolder:
         raise NotImplementedException
 
     def uidexists(self,uid):
-        """Returns true if uid exists"""
-	mlist = self.getmessagelist()
-	if uid in mlist:
-		return 1
-	else:
-		return 0
-	return 0
+        """Returns True if uid exists"""
+	if uid in self.messagelist:
+            return True
+        return False
 
     def getmessageuidlist(self):
         """Returns a list of UIDs.
-- 
1.7.1





More information about the OfflineIMAP-project mailing list