From: David Favro Date: Thu, 15 Mar 2007 04:41:43 +0000 (+0100) Subject: UID validity diagnostics improvement X-Git-Tag: Working_post-imaplib_removal~19 X-Git-Url: https://code.delx.au/offlineimap/commitdiff_plain/b06845fc700bb572519ef91d9754811947383cf5 UID validity diagnostics improvement * Reduced the number of parameters passed to ui.validityproblem() because they were all just method-calls to the folder object, which is already passed as the first parameter (reduction of unnecessary complexity). * Improved the diagnostic message for an 'UID validity problem' by including the name of the repository in which the folder resides; previously it was not possible to determine from the diagnostic alone on which side the problem was. --- diff --git a/offlineimap/ui/UIBase.py b/offlineimap/ui/UIBase.py index 59ea78e..c086a57 100644 --- a/offlineimap/ui/UIBase.py +++ b/offlineimap/ui/UIBase.py @@ -2,6 +2,8 @@ # Copyright (C) 2002 John Goerzen # # +# Portions Copyright (C) 2007 David Favro +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or @@ -208,9 +210,10 @@ class UIBase: s.getnicename(srcrepos), s.getnicename(destrepos))) - def validityproblem(s, folder, saved, new): - s.warn("UID validity problem for folder %s (saved %d; got %d); skipping it" % \ - (folder.getname(), saved, new)) + def validityproblem(s, folder): + s.warn("UID validity problem for folder %s (repo %s) (saved %d; got %d); skipping it" % \ + (folder.getname(), folder.getrepository().getname(), + folder.getsaveduidvalidity(), folder.getuidvalidity())) def loadmessagelist(s, repos, folder): if s.verbose > 0: