From ce02e1c51487789be4b7a22075c3fada749d7923 Mon Sep 17 00:00:00 2001 From: jgoerzen Date: Fri, 18 Apr 2003 08:06:04 +0100 Subject: [PATCH] /offlineimap/head: changeset 446 Prepping for 0.99.13 -- fixed some niggling bugs --- offlineimap/head/bin/offlineimap | 2 +- offlineimap/head/offlineimap.py | 2 +- offlineimap/head/offlineimap/folder/IMAP.py | 6 +++--- offlineimap/head/offlineimap/repository/IMAP.py | 13 ++++++++----- offlineimap/head/offlineimap/version.py | 6 +++--- 5 files changed, 16 insertions(+), 13 deletions(-) diff --git a/offlineimap/head/bin/offlineimap b/offlineimap/head/bin/offlineimap index aecfd95..15c6755 100644 --- a/offlineimap/head/bin/offlineimap +++ b/offlineimap/head/bin/offlineimap @@ -18,4 +18,4 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA from offlineimap import init -init.startup('3.99.12') +init.startup('3.99.13') diff --git a/offlineimap/head/offlineimap.py b/offlineimap/head/offlineimap.py index 511af14..50fbd93 100644 --- a/offlineimap/head/offlineimap.py +++ b/offlineimap/head/offlineimap.py @@ -18,4 +18,4 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA from offlineimap import init -init.startup('3.99.12') +init.startup('3.99.13') diff --git a/offlineimap/head/offlineimap/folder/IMAP.py b/offlineimap/head/offlineimap/folder/IMAP.py index 3a86dab..956ea8a 100644 --- a/offlineimap/head/offlineimap/folder/IMAP.py +++ b/offlineimap/head/offlineimap/folder/IMAP.py @@ -19,7 +19,7 @@ from Base import BaseFolder from offlineimap import imaputil, imaplib from offlineimap.ui import UIBase -import rfc822, time, string, random, binascii +import rfc822, time, string, random, binascii, re from StringIO import StringIO from copy import copy @@ -69,7 +69,7 @@ class IMAPFolder(BaseFolder): try: # Primes untagged_responses - assert(imapobj.select(self.getfullname(), readonly = 1)[0] == 'OK') + imapobj.select(self.getfullname(), readonly = 1) try: # Some mail servers do not return an EXISTS response if # the folder is empty. @@ -174,7 +174,7 @@ class IMAPFolder(BaseFolder): # but some IMAP servers nonetheless choke on 1902. date = imaplib.Time2Internaldate(time.localtime()) - content = re.sub("[^\r]\n", "\r\n", content) + content = re.sub("([^\r])\n", "\\1\r\n", content) (headername, headervalue) = self.savemessage_getnewheader(content) content = self.savemessage_addheader(content, headername, diff --git a/offlineimap/head/offlineimap/repository/IMAP.py b/offlineimap/head/offlineimap/repository/IMAP.py index 26fec39..2cf5b23 100644 --- a/offlineimap/head/offlineimap/repository/IMAP.py +++ b/offlineimap/head/offlineimap/repository/IMAP.py @@ -157,11 +157,14 @@ class IMAPRepository(BaseRepository): imapobj = self.imapserver.acquireconnection() try: for foldername in self.folderincludes: - if imapobj.select(foldername, readonly = 1)[0] == 'OK': - retval.append(self.getfoldertype()(self.imapserver, - foldername, - self.nametrans(foldername), - self.accountname, self)) + try: + imapobj.select(foldername, readonly = 1) + except ValueError: + continue + retval.append(self.getfoldertype()(self.imapserver, + foldername, + self.nametrans(foldername), + self.accountname, self)) finally: self.imapserver.releaseconnection(imapobj) diff --git a/offlineimap/head/offlineimap/version.py b/offlineimap/head/offlineimap/version.py index 9a642d3..eaa6227 100644 --- a/offlineimap/head/offlineimap/version.py +++ b/offlineimap/head/offlineimap/version.py @@ -1,8 +1,8 @@ productname = 'OfflineIMAP' -versionstr = "3.99.12" -revno = long('$Rev: 439 $'[6:-2]) +versionstr = "3.99.13" +revno = long('$Rev: 446 $'[6:-2]) revstr = "Rev %d" % revno -datestr = '$Date: 2003-04-17 16:16:00 -0500 (Thu, 17 Apr 2003) $' +datestr = '$Date: 2003-04-17 21:06:04 -0500 (Thu, 17 Apr 2003) $' versionlist = versionstr.split(".") major = versionlist[0]