/head: changeset 88
Another attempt at fixing read-only folders
This commit is contained in:
parent
f18718615b
commit
a6f5b1da98
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user