From a82eb46871d1bfcce37a6618feca3f90f15b3a3d Mon Sep 17 00:00:00 2001 From: jgoerzen Date: Tue, 9 Jul 2002 03:23:47 +0100 Subject: [PATCH] /head: changeset 85 Updated to work better with read-only folders --- head/debian/changelog | 6 ++++++ head/offlineimap.conf | 2 +- head/offlineimap/folder/IMAP.py | 7 ++++++- head/offlineimap/version.py | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/head/debian/changelog b/head/debian/changelog index 0dc4701..455ce1e 100644 --- a/head/debian/changelog +++ b/head/debian/changelog @@ -1,3 +1,9 @@ +offlineimap (2.0.5) unstable; urgency=low + + * Placeholder + + -- John Goerzen Fri, 5 Jul 2002 09:21:52 -0500 + offlineimap (2.0.4) unstable; urgency=low * Made OfflineIMAP at least rudimentarily compatible with read-only diff --git a/head/offlineimap.conf b/head/offlineimap.conf index 1b98b92..e4c2a41 100644 --- a/head/offlineimap.conf +++ b/head/offlineimap.conf @@ -159,7 +159,7 @@ localfolders = ~/Test # Example 3: Using a regular expression to exclude Trash and all folders # containing the characters "Del". # -# folderfilter = lambda foldername: not re.search('(^Trash$|Del)') +# folderfilter = lambda foldername: not re.search('(^Trash$|Del)', foldername) # # If folderfilter is not specified, ALL remote folders will be # synchronized. diff --git a/head/offlineimap/folder/IMAP.py b/head/offlineimap/folder/IMAP.py index 17ff55c..03ac6db 100644 --- a/head/offlineimap/folder/IMAP.py +++ b/head/offlineimap/folder/IMAP.py @@ -47,6 +47,8 @@ class IMAPFolder(BaseFolder): imapobj = self.imapserver.acquireconnection() try: x = imapobj.status(self.getfullname(), '(UIDVALIDITY)')[1][0] + except imapobj.readonly: + pass finally: self.imapserver.releaseconnection(imapobj) uidstring = imaputil.imapsplit(x)[1] @@ -60,7 +62,10 @@ class IMAPFolder(BaseFolder): except imapobj.readonly: pass self.messagelist = {} - response = imapobj.status(self.getfullname(), '(MESSAGES)')[1][0] + try: + response = imapobj.status(self.getfullname(), '(MESSAGES)')[1][0] + except imapobj.readonly: + pass result = imaputil.imapsplit(response)[1] maxmsgid = long(imaputil.flags2hash(result)['MESSAGES']) if (maxmsgid < 1): diff --git a/head/offlineimap/version.py b/head/offlineimap/version.py index 622a1fa..04c6f9c 100644 --- a/head/offlineimap/version.py +++ b/head/offlineimap/version.py @@ -1,5 +1,5 @@ productname = 'OfflineIMAP' -versionstr = "2.0.3" +versionstr = "2.0.5" versionlist = versionstr.split(".") major = versionlist[0]