]> code.delx.au - offlineimap/commitdiff
UID validity diagnostics improvement
authorDavid Favro <offlineimap@meta-dynamic.com>
Thu, 15 Mar 2007 04:41:43 +0000 (05:41 +0100)
committerDavid Favro <offlineimap@meta-dynamic.com>
Thu, 15 Mar 2007 04:41:43 +0000 (05:41 +0100)
* 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.

offlineimap/ui/UIBase.py

index 59ea78eba74036cb09087cf4f1d39e9ea24acec6..c086a57db37e4a4e1859004ee88213be8df2c493 100644 (file)
@@ -2,6 +2,8 @@
 # Copyright (C) 2002 John Goerzen
 # <jgoerzen@complete.org>
 #
+# Portions Copyright (C) 2007 David Favro <offlineimap@meta-dynamic.com>
+#
 #    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: