/head: changeset 6

Updated -- more writing
This commit is contained in:
jgoerzen
2002-06-19 06:22:21 +01:00
parent ab27fdaad7
commit abcbfd9b2f
10 changed files with 130 additions and 3 deletions

View File

@ -17,10 +17,20 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
from Base import BaseRepository
from imapsync import folder, imaputil
class IMAPRepository(BaseRepository):
def __init__(self, imapserver):
"""Initialize an IMAPRepository object. Takes an IMAPServer
object."""
self.imapserver = imapserver
self.imapobj = imapserver.makeconnection()
def getfolders(self):
retval = []
for string in self.imapobj.list(self.imapserver.root)[1]:
flags, delim, name = imaputil.imapsplit(string)
if '\\Noselect' in imaputil.flagsplit(flags):
continue
retval.append(folder.IMAP.IMAPFolder(self.imapserver, name))
return retval

View File

@ -0,0 +1 @@
import IMAP, Base