fix magicline import

commit 0318c6a [Create LocalStatus or LocalStatusSQLite folders] changes import
of LocalStatus but doesn't preserve magicline.

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Nicolas Sebrecht 2011-05-25 21:09:09 +02:00
parent da36c5c1e7
commit e87f213046

View File

@ -17,7 +17,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
from Base import BaseRepository from Base import BaseRepository
from offlineimap.folder.LocalStatus import LocalStatusFolder from offlineimap.folder.LocalStatus import LocalStatusFolder, magicline
from offlineimap.folder.LocalStatusSQLite import LocalStatusSQLiteFolder from offlineimap.folder.LocalStatusSQLite import LocalStatusSQLiteFolder
import os import os
import re import re
@ -67,7 +67,7 @@ class LocalStatusRepository(BaseRepository):
filename = self.getfolderfilename(foldername) filename = self.getfolderfilename(foldername)
file = open(filename + ".tmp", "wt") file = open(filename + ".tmp", "wt")
file.write(offlineimap.folder.LocalStatus.magicline + '\n') file.write(magicline + '\n')
file.close() file.close()
os.rename(filename + ".tmp", filename) os.rename(filename + ".tmp", filename)
# Invalidate the cache. # Invalidate the cache.