accounts.py: minor improvements

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Nicolas Sebrecht 2016-04-09 18:50:12 +02:00
parent 657f258196
commit 801dda521e

View File

@ -566,16 +566,16 @@ def syncfolder(account, remotefolder, quick):
ui.syncingmessages(remoterepos, remotefolder, localrepos, localfolder) ui.syncingmessages(remoterepos, remotefolder, localrepos, localfolder)
remotefolder.syncmessagesto(localfolder, statusfolder) remotefolder.syncmessagesto(localfolder, statusfolder)
else: else:
ui.debug('imap', "Not syncing to read-only repository '%s'" \ ui.debug('imap', "Not syncing to read-only repository '%s'"%
% localrepos.getname()) localrepos.getname())
# Synchronize local changes # Synchronize local changes.
if not remoterepos.getconfboolean('readonly', False): if not remoterepos.getconfboolean('readonly', False):
ui.syncingmessages(localrepos, localfolder, remoterepos, remotefolder) ui.syncingmessages(localrepos, localfolder, remoterepos, remotefolder)
localfolder.syncmessagesto(remotefolder, statusfolder) localfolder.syncmessagesto(remotefolder, statusfolder)
else: else:
ui.debug('', "Not syncing to read-only repository '%s'" \ ui.debug('', "Not syncing to read-only repository '%s'"%
% remoterepos.getname()) remoterepos.getname())
statusfolder.save() statusfolder.save()
localrepos.restore_atime() localrepos.restore_atime()