offlineimap.conf: allow non-spaces in the account list

Commit c992f58530 pretends to fix this bug it doesn't.

Regression introduced in v7.0.0.

Github-fix: https://github.com/OfflineIMAP/offlineimap/issues/355
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Nicolas Sebrecht 2016-07-28 04:06:52 +02:00
parent 88e8a4895e
commit 0b824bdc49
2 changed files with 5 additions and 6 deletions

View File

@ -379,7 +379,7 @@ class OfflineImap(object):
activeaccountnames = self.config.get("general", "accounts")
if options.accounts:
activeaccountnames = options.accounts
activeaccountnames = activeaccountnames.split(",")
activeaccountnames = [x.lstrip() for x in activeaccountnames.split(",")]
allaccounts = accounts.getaccountlist(self.config)
for accountname in activeaccountnames:

View File

@ -66,13 +66,12 @@ class IMAPRepository(BaseRepository):
self.kathread.start()
def stopkeepalive(self):
if not hasattr(self, 'kaevent'):
# Keepalive is not active.
return
if self.kaevent is None:
return # Keepalive is not active.
self.kaevent.set()
del self.kathread
del self.kaevent
self.kathread = None
self.kaevent = None
def holdordropconnections(self):
if not self.getholdconnectionopen():