[PATCH] Re: Fix caching inconsistencies in getselectedfolder()

Nicolas Sebrecht nicolas.s-dev at laposte.net
Thu Jul 7 17:36:40 BST 2011


[ Please keep cc intact. ]

On Wed, Jul 06, 2011 at 11:15:33PM +0200, Sebastian Spaeth wrote:
> getselectedfolder was using a cached variable that we were setting in
> select(), but sometimes the IMAP4 instance got into the SELECTED state
> without explicitely select()ing, it seems, and our variable was unset.
> 
> Let us just use the self.mailbox variable that imaplib2 is setting when
> select()ing rather than doing our own caching. Also remove the part
> where we were setting the cache.
> 
> Just access self.state rather than looking up self.state via
> self.getstate() every time, it is just an unnecessary layer of
> redirection.
> 
> Signed-off-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
> ---
> In addition to Arnaud's patch, this also removes the part where we were
> setting the unneeded cached variable.

Added

  Original-patch-by Arnaud

line but it's your job! ,-)

Applied.

-- 
Nicolas Sebrecht




More information about the OfflineIMAP-project mailing list