Sanity check return value of UIDVALIDTY response
We have a reported case where response('UIDVALIDITY') returned [None] which results in an ugly non-intuitive crash. Sanity check and report something nicer. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
parent
50de2174bf
commit
7184ec28cc
@ -71,6 +71,7 @@ class IMAPFolder(BaseFolder):
|
||||
# SELECT receives UIDVALIDITY response
|
||||
self.selectro(imapobj)
|
||||
typ, uidval = imapobj.response('UIDVALIDITY')
|
||||
assert uidval != [None], "response('UIDVALIDITY') returned [None]!"
|
||||
return long(uidval[0])
|
||||
finally:
|
||||
self.imapserver.releaseconnection(imapobj)
|
||||
|
Loading…
Reference in New Issue
Block a user