Fix hooks for IDLE sync
`presynchook` and `postsynchook` for IDLE-triggered syncs were broken by
da69fd8
. This fixes them.
Signed-off-by: Reto Schnyder <reto.a.schnyder@bluewin.ch>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
parent
21332efb08
commit
f6935342c2
|
@ -823,11 +823,12 @@ class IdleThread(object):
|
||||||
statusrepos = account.statusrepos
|
statusrepos = account.statusrepos
|
||||||
remotefolder = remoterepos.getfolder(self.folder, decode=False)
|
remotefolder = remoterepos.getfolder(self.folder, decode=False)
|
||||||
|
|
||||||
hook = account.getconf('presynchook', '')
|
hook_env = {
|
||||||
account.callhook(hook)
|
'OIMAP_ACCOUNT_NAME': account.getname(),
|
||||||
|
}
|
||||||
|
account.callhook('presynchook', hook_env)
|
||||||
offlineimap.accounts.syncfolder(account, remotefolder, quick=False)
|
offlineimap.accounts.syncfolder(account, remotefolder, quick=False)
|
||||||
hook = account.getconf('postsynchook', '')
|
account.callhook('postsynchook', hook_env)
|
||||||
account.callhook(hook)
|
|
||||||
|
|
||||||
ui = getglobalui()
|
ui = getglobalui()
|
||||||
ui.unregisterthread(currentThread()) #syncfolder registered the thread
|
ui.unregisterthread(currentThread()) #syncfolder registered the thread
|
||||||
|
|
Loading…
Reference in New Issue