offlineimap rev 556
"Automatic Subversion Change Mailer" <[email protected]> Tue, 5 Aug 2003 15:59:01 -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-08-05 15:58:49 -0500 (Tue, 05 Aug 2003)
New Revision: 556
Modified:
offlineimap/branches/twisted/offlineimap/folder/IMAP.py
Log:
Made some more progress...
Diff:
Modified: offlineimap/branches/twisted/offlineimap/folder/IMAP.py
==============================================================================
--- offlineimap/branches/twisted/offlineimap/folder/IMAP.py 2003-08-05 20:52:50 UTC (rev 555)
+++ offlineimap/branches/twisted/offlineimap/folder/IMAP.py 2003-08-05 20:58:49 UTC (rev 556)
@@ -162,21 +162,24 @@
return leader + newline + trailer
def _savemessage_searchforheader(self, imapobj, headername, headervalue):
+ # Assumed: that the proper mailbox has been select()ed
# FIXME: HANDLE APPENDUID
#if imapobj.untagged_responses.has_key('APPENDUID'):
# return long(imapobj.untagged_responses['APPENDUID'][0].split(' ')[1])
- # THIS WHOLE FUNCTION IS HOSED.
ui = UIBase.getglobalui()
ui.debug('imap', 'savemessage_searchforheader called for %s: %s' % \
(headername, headervalue))
# Now find the UID it got.
headervalue = imapobj._quote(headervalue)
- try:
- matchinguids = imapobj.uid('search', None,
+ query = Query(header = (headername, headervalue))
+ d = imapobj.search(query, uid = 1)
+ ## FIXME: START HERE
+ matchinguids = imapobj.uid('search', None,
'(HEADER %s %s)' % (headername, headervalue))[1][0]
- except imapobj.error:
- # IMAP server doesn't implement search or had a problem.
- return 0
+ # FIXME
+ #except imapobj.error:
+ # # IMAP server doesn't implement search or had a problem.
+ # return 0
ui.debug('imap', 'savemessage_searchforheader got initial matchinguids: ' + repr(matchinguids))
matchinguids = matchinguids.split(' ')
@@ -245,7 +248,7 @@
ui = UIBase.getglobalui()
ui.debug('imap', 'savemessage: attempt %d to get new UID' \
% previousattempts)
- d = self.savemessage_searchforheader(imapobj, headername,
+ d = self._savemessage_searchforheader(imapobj, headername,
headervalue)
if previousattempts == 1:
# This is our last try.