[PATCH] Fix missing import and minor issue on folder selection
christocoleman at yahoo.com
Wed Jul 6 17:12:07 BST 2011
>> getselectedfolder() checks what is the current selected folder, but sometimes,
>> selectedfolder attribute has not been set yet, thus an AttributeError
>> exception is raised, whereas it would be harmless to return None here and
>> later check with later call of select().
>> - if self.getstate() == 'SELECTED':
>> + if self.getstate() == 'SELECTED' and hasattr(self, "selectedfolder"):
>This I am a bit more sceptical about. We should obviously be fixing
>this, but this feels a bit more like we are papering over some design
>the imaplib2 IMAP4 instance sets the mailbox name in "self.mailbox"
>whenever it goes into SELECTED state, perhaps we should be using that
>value rather than doing our own caching in the selectedfolder variable
>This would avoid the kind of inconsistency that we are seeing in the
>What do you think?
+1. Must maintain "cache coherency," (as they say in the world of CPU's)... and avoid caching data beyond the point in time where it likely could become stale/incorrect.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OfflineIMAP-project