offlineimap rev 541

"Automatic Subversion Change Mailer" <[email protected]> Mon, 28 Jul 2003 15:11:08 -0500 (CDT)
Newsgroups gmane.mail.imap.offlineimap.subversion
Message-ID <[email protected]>
You are receiving this message because
all commits get sent to this address.

Author: jgoerzen
Date: 2003-07-28 15:10:20 -0500 (Mon, 28 Jul 2003)
New Revision: 541

Modified:
  offlineimap/branches/twisted/offlineimap/folder/Base.py
  offlineimap/branches/twisted/offlineimap/folder/IMAP.py

Log:
Committed


Diff:
Modified: offlineimap/branches/twisted/offlineimap/folder/Base.py
==============================================================================
--- offlineimap/branches/twisted/offlineimap/folder/Base.py	2003-07-28 19:02:02 UTC (rev 540)
+++ offlineimap/branches/twisted/offlineimap/folder/Base.py	2003-07-28 20:10:20 UTC (rev 541)
@@ -314,6 +314,7 @@
         # synced to the status cache.  This is only a problem with
         # self.getmessage().  So, don't call self.getmessage unless
         # really needed.
+        print "This is copymessageto."
         if register:
             UIBase.getglobalui().registerthread(self.getaccountname())
         print uid
@@ -331,6 +332,7 @@
         return self.copymessageto_worker('', uid, applyto, flags)
 
     def copymessageto_worker(self, message, uid, applyto, flags):
+        print "This is copymessageto_worker for", uid
         if len(applyto) == 0:
             return
 
@@ -341,6 +343,7 @@
         return d
 
     def copymessageto_saveuid(self, newuid, message, uid, applyto, flags):
+        print "This is copymessageto_saveuid for", uid
         if newuid > 0 and newuid != uid:
             # Change the local uid.
             d = self.savemessage(newuid, message, flags)

Modified: offlineimap/branches/twisted/offlineimap/folder/IMAP.py
==============================================================================
--- offlineimap/branches/twisted/offlineimap/folder/IMAP.py	2003-07-28 19:02:02 UTC (rev 540)
+++ offlineimap/branches/twisted/offlineimap/folder/IMAP.py	2003-07-28 20:10:20 UTC (rev 541)
@@ -132,17 +132,20 @@
     def getmessage(self, uid):
         imapobj = self.imapserver.acquireconnection()
         d = imapobj.examine(self.getfullname())
-        d.addCallback(lambda x, uid, useuid, hdr: \
-                      imapobj.fetchSpecific(uid, useuid, hdr),
-                      str(uid), 1, 'BODY.PEEK[]')
+        d.addCallback(lambda x, uid: \
+                      imapobj.fetchSpecific(uid, 1, peek = 1),
+                      str(uid))
         d.addCallback(self.getmessage_process)
         return d
 
     def getmessage_process(self, message):
-        print "getmessage_process: message is", message
         key = message.keys()[0]
-        print "returning", message[key]
-        return message[key].replace("\r\n", "\n")
+        data = message[key][0]
+        i = data.index('BODY')
+        while 1:
+            if type(i) == type(''):
+                return data[i].replate("\r\n", "\n")
+            i += 1
                                       
     def getmessageflags(self, uid):
         return self.messagelist[uid]['flags']