1
0
mirror of https://github.com/OfflineIMAP/offlineimap.git synced 2024-06-25 07:27:44 +02:00

/head: changeset 64

Fixed a bug with the status call
This commit is contained in:
jgoerzen 2002-07-04 02:00:58 +01:00
parent aff34d096c
commit 993f85bfa6

View File

@ -35,14 +35,14 @@ class IMAPFolder(BaseFolder):
return self.visiblename return self.visiblename
def getuidvalidity(self): def getuidvalidity(self):
x = self.imapobj.status(self.getfullname(), ('UIDVALIDITY'))[1][0] x = self.imapobj.status(self.getfullname(), '(UIDVALIDITY)')[1][0]
uidstring = imaputil.imapsplit(x)[1] uidstring = imaputil.imapsplit(x)[1]
return long(imaputil.flagsplit(uidstring)[1]) return long(imaputil.flagsplit(uidstring)[1])
def cachemessagelist(self): def cachemessagelist(self):
assert(self.imapobj.select(self.getfullname())[0] == 'OK') assert(self.imapobj.select(self.getfullname())[0] == 'OK')
self.messagelist = {} self.messagelist = {}
response = self.imapobj.status(self.getfullname(), ('MESSAGES'))[1][0] response = self.imapobj.status(self.getfullname(), '(MESSAGES)')[1][0]
result = imaputil.imapsplit(response)[1] result = imaputil.imapsplit(response)[1]
maxmsgid = long(imaputil.flags2hash(result)['MESSAGES']) maxmsgid = long(imaputil.flags2hash(result)['MESSAGES'])
if (maxmsgid < 1): if (maxmsgid < 1):