[PATCH] Fix copyingmessage() in Machine UI

Sebastian Spaeth Sebastian at SSpaeth.de
Thu Aug 18 08:05:45 BST 2011

I changed the API to pass in a folder rather than a list of folders, but
used getnicename() on the wrong object. It is not used on the folder but
on the ui object. Fix this and give the variable somewhat better names.

Signed-off-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
 offlineimap/ui/Machine.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/offlineimap/ui/Machine.py b/offlineimap/ui/Machine.py
index bb8c7fa..7a480ae 100644
--- a/offlineimap/ui/Machine.py
+++ b/offlineimap/ui/Machine.py
@@ -108,10 +108,10 @@ class MachineUI(UIBase):
                 (s.getnicename(sr), sf.getname(), s.getnicename(dr),
-    def copyingmessage(s, uid, src, destfolder):
-        s._printData('copyingmessage', "%d\n%s\n%s\n%s[%s]"  % \
-                (uid, s.getnicename(src), src.getname(),
-                 destfolder.getnicename(), destfolder))
+    def copyingmessage(self, uid, srcfolder, destfolder):
+        self._printData('copyingmessage', "%d\n%s\n%s\n%s[%s]" % \
+                (uid, self.getnicename(srcfolder), srcfolder.getname(),
+                 self.getnicename(destfolder), destfolder))
     def folderlist(s, list):
         return ("\f".join(["%s\t%s" % (s.getnicename(x), x.getname()) for x in list]))

More information about the OfflineIMAP-project mailing list