/head: changeset 88

Another attempt at fixing read-only folders
This commit is contained in:
jgoerzen 2002-07-09 04:05:34 +01:00
parent f18718615b
commit a6f5b1da98

View File

@ -45,11 +45,12 @@ class IMAPFolder(BaseFolder):
def getuidvalidity(self):
imapobj = self.imapserver.acquireconnection()
x = None
try:
try:
x = imapobj.status(self.getfullname(), '(UIDVALIDITY)')[1][0]
except imapobj.readonly:
pass
x = imapobj.status(self.getfullname(), '(UIDVALIDITY)')[1][0]
finally:
self.imapserver.releaseconnection(imapobj)
uidstring = imaputil.imapsplit(x)[1]
@ -63,10 +64,11 @@ class IMAPFolder(BaseFolder):
except imapobj.readonly:
pass
self.messagelist = {}
response = None
try:
response = imapobj.status(self.getfullname(), '(MESSAGES)')[1][0]
except imapobj.readonly:
pass
response = imapobj.status(self.getfullname(), '(MESSAGES)')[1][0]
result = imaputil.imapsplit(response)[1]
maxmsgid = long(imaputil.flags2hash(result)['MESSAGES'])
if (maxmsgid < 1):