mirror of
https://github.com/pulb/mailnag.git
synced 2026-05-06 23:47:11 +02:00
Fix unitilized conn bug
This commit is contained in:
@@ -80,7 +80,7 @@ class MailnagDaemon:
|
||||
accountman = AccountManager(CredentialStore.from_string(self._cfg.get('core', 'credentialstore')))
|
||||
accountman.load_from_cfg(self._cfg, enabled_only = True)
|
||||
self._accounts = accountman.to_list()
|
||||
|
||||
for a in self._accounts: a.get_imap_folders()
|
||||
self._hookreg = HookRegistry()
|
||||
self._conntest = ConnectivityTest(testmode_mapping[self._cfg.get('core', 'connectivity_test')])
|
||||
|
||||
@@ -129,8 +129,8 @@ class MailnagDaemon:
|
||||
if self._accounts != None:
|
||||
for acc in self._accounts:
|
||||
if acc.has_connection():
|
||||
conn = acc.get_connection(use_existing = True)
|
||||
if acc.imap:
|
||||
conn = acc.get_connection(use_existing = True)
|
||||
conn.close()
|
||||
conn.logout()
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user