docker-offlineimap/offlineimap/folder
Nicolas Sebrecht 3f70d9ef37 sqlite: open database when we use it rather than at instantiation time
Backported from 8e995a69bfa003ab822b55731429d84b3bc5626f.

We currently close the database as soon as possible while we handle the status
backend but this is still too early because autorefresh induces looping on this
code block.

Instead of delaying the closing outside of the loop, it's easier to delay the
opening as late as possible (inside the loop). The downside is that the database
is opened/closed more than once when autorefresh is enabled. The good news is
that this make the code much easier.

Fixes regression introduces by 6fb5700.

Reported-by: Łukasz Żarnowiecki <dolohow@outlook.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-06-08 01:59:39 +02:00
..
__init__.py Use "from . import" for relative imports 2012-02-06 17:41:43 +01:00
Base.py Keywords: avoid warning at each message when no keywords are used 2015-11-22 20:05:34 +01:00
Gmail.py fix: broken retry loop would break connection management 2015-11-26 17:11:59 +01:00
GmailMaildir.py maxage: fix timezone issues, remove IMAP-IMAP support, add startdate option 2015-04-07 11:54:35 +02:00
IMAP.py fix: broken retry loop would break connection management 2015-11-26 17:11:59 +01:00
LocalStatus.py sqlite: open database when we use it rather than at instantiation time 2016-06-08 01:59:39 +02:00
LocalStatusSQLite.py sqlite: open database when we use it rather than at instantiation time 2016-06-08 01:59:39 +02:00
Maildir.py Identify and fix messages with FMD5 inconsistencies 2016-03-06 21:01:51 +01:00
UIDMaps.py maxage: fix timezone issues, remove IMAP-IMAP support, add startdate option 2015-04-07 11:54:35 +02:00