/head: changeset 6
Updated -- more writing
This commit is contained in:
@ -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
|
||||
|
@ -0,0 +1 @@
|
||||
import IMAP, Base
|
||||
|
Reference in New Issue
Block a user