[PATCH] LocalStatus.py: Fix getfolders()

Sebastian Spaeth Sebastian at SSpaeth.de
Fri Aug 12 07:12:04 UTC 2011


This code was unused and broken. It is still unused but this commit
fixes it. (We should retain the method in case we ever start calling
getfolders() on LocalStatus.

Signed-off-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
---
This code was unused, but Vladimir's folder creation patch were
relying on this code being used, so this fix should go into 'next'.

Vladimir, here you go. I hope this will help with the folder
creation patches.

 offlineimap/repository/LocalStatus.py |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/offlineimap/repository/LocalStatus.py b/offlineimap/repository/LocalStatus.py
index 022be21..50dfdc8 100644
--- a/offlineimap/repository/LocalStatus.py
+++ b/offlineimap/repository/LocalStatus.py
@@ -80,14 +80,13 @@ class LocalStatusRepository(BaseRepository):
                                            self.config)
 
     def getfolders(self):
-        """Returns a list of ALL folders on this server.
-
-        This is currently nowhere used in the code."""
+        """Returns a list of all cached folders."""
         if self._folders != None:
             return self._folders
 
+        self._folders = []
         for folder in os.listdir(self.directory):
-            self._folders = retval.append(self.getfolder(folder))
+            self._folders.append(self.getfolder(folder))
         return self._folders
 
     def forgetfolders(self):
-- 
1.7.4.1




More information about the OfflineIMAP-project mailing list