[PATCH] Re: workaround - problem when selecting zimbra folders

Nicolas Sebrecht nicolas.s-dev at laposte.net
Tue Jan 4 18:31:51 GMT 2011


On Tue, Jan 04, 2011 at 11:29:33AM +0100, marvinthepa wrote:
> 
> For certain folders on our zimbra instance, offlineimap somehow gets to
> the state "SELECTED", while self.selectedfolder ist not yet
> initialized.
> I was not able to debug this thoroughly. However, this workaround helps.
> If self.selectedfolder is not initialized, getselectedfolder returns None and
> UsefulIMAPMixIn.select takes care of the rest.

The patch makes sense from inside the class but I'm not enough familiar
with that portion of code to tell more.

> Signed-off-by: marvinthepa <forke at uni-bonn.de>

Could you please sign off with your real name?

> ---
>  offlineimap/imapserver.py |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/offlineimap/imapserver.py b/offlineimap/imapserver.py
> index 74f1a27..a6c6c4e 100644
> --- a/offlineimap/imapserver.py
> +++ b/offlineimap/imapserver.py
> @@ -39,7 +39,7 @@ class UsefulIMAPMixIn:
>      def getstate(self):
>          return self.state
>      def getselectedfolder(self):
> -        if self.getstate() == 'SELECTED':
> +        if self.getstate() == 'SELECTED' and hasattr(self,"selectedfolder"):
>              return self.selectedfolder
>          return None
-- 
Nicolas Sebrecht




More information about the OfflineIMAP-project mailing list