From 5eb131ef2b0fc85e59e336f0a0a45bb740e37dd4 Mon Sep 17 00:00:00 2001 From: Nicolas Sebrecht Date: Tue, 8 Nov 2016 07:07:11 +0100 Subject: [PATCH] accounts: minor refactoring Signed-off-by: Nicolas Sebrecht --- offlineimap/accounts.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/offlineimap/accounts.py b/offlineimap/accounts.py index 46671c1..2ebcc59 100644 --- a/offlineimap/accounts.py +++ b/offlineimap/accounts.py @@ -433,7 +433,7 @@ def syncfolder(account, remotefolder, quick): Filtered folders on the remote side will not invoke this function. However, this might be called in a concurrently.""" - def check_uid_validity(localfolder, remotefolder, statusfolder): + def check_uid_validity(): # If either the local or the status folder has messages and # there is a UID validity problem, warn and abort. If there are # no messages, UW IMAPd loses UIDVALIDITY. But we don't really @@ -558,14 +558,15 @@ def syncfolder(account, remotefolder, quick): "with maxage or startdate; ignoring -q.") if maxage != None: cachemessagelists_upto_date(maxage) + check_uid_validity() elif localstart != None: cachemessagelists_startdate(remotefolder, localfolder, localstart) - check_uid_validity(localfolder, remotefolder, statusfolder) + check_uid_validity() elif remotestart != None: cachemessagelists_startdate(localfolder, remotefolder, remotestart) - check_uid_validity(localfolder, remotefolder, statusfolder) + check_uid_validity() else: localfolder.cachemessagelist() if quick: @@ -574,7 +575,7 @@ def syncfolder(account, remotefolder, quick): ui.skippingfolder(remotefolder) localrepos.restore_atime() return - check_uid_validity(localfolder, remotefolder, statusfolder) + check_uid_validity() remotefolder.cachemessagelist() # Synchronize remote changes.