Locally created mailboxes not synchronized to IMAP

Vladimir Marek Vladimir.Marek at Oracle.COM
Tue Aug 16 11:42:14 BST 2011


> >  * re.sub('^outside/?', '', foldername)
> >  WARNING: ERROR Attempting to create folder :Traceback (most recent call last):
> >   File "/builds/vm156888/offlineimap/offlineimap/repository/Base.py", line 147, in syncfoldersto
> >     copyfolder.makefolder(key.replace(dest.getsep(), copyfolder.getsep()))
> >   File "/builds/vm156888/offlineimap/offlineimap/repository/LocalStatus.py", line 72, in makefolder
> >     os.rename(filename + ".tmp", filename)
> > OSError: [Errno 21] Is a directory
> 
> Hi Vladimir,
> 
> I attempted to deal with empty folder names with the following patch. Do
> you dare to try and see if it makes things working with this nametrans
> rule?

I will do it later. I have run into some problems and into lack of time
:)

BTW, is this correct way of handling exceptions: ?

--- a/offlineimap/folder/Base.py
+++ b/offlineimap/folder/Base.py
@@ -428,7 +428,7 @@ class BaseFolder(object):
                 action(dstfolder, statusfolder)
             except (KeyboardInterrupt):
                 raise
-            except OfflineImap, e:
+            except OfflineImapError, e:
                 if e.severity > OfflineImapError.ERROR.FOLDER:
                     raise
                 self.ui.error(e, exc_info()[2])

Thank you for your help
-- 
	Vlad




More information about the OfflineIMAP-project mailing list