[PATCH 1/3] Introduce new error level FOLDER_RETRY

Sebastian Spaeth Sebastian at SSpaeth.de
Thu Sep 1 09:23:45 BST 2011


In cases where processing a folder failed, but a retry might well succeed
e.g. when the server connection had simply timed out and was disconnected,
we can throw a FOLDER_RETRY (which is less severe than FOLDER).

Signed-off-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
---
 offlineimap/error.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/offlineimap/error.py b/offlineimap/error.py
index 9e55162..aa7f535 100644
--- a/offlineimap/error.py
+++ b/offlineimap/error.py
@@ -5,11 +5,12 @@ class OfflineImapError(Exception):
         """Severity level of an Exception
 
         * **MESSAGE**:  Abort the current message, but continue with folder
+        * **FOLDER_RETRY**: Error syncing folder, but do retry
         * **FOLDER**:   Abort folder sync, but continue with next folder
         * **REPO**:     Abort repository sync, continue with next account
         * **CRITICAL**: Immediately exit offlineimap
         """
-        MESSAGE, FOLDER, REPO, CRITICAL = 0, 10, 20, 30
+        MESSAGE, FOLDER_RETRY, FOLDER, REPO, CRITICAL = 0, 10, 15, 20, 30
 
     def __init__(self, reason, severity, errcode=None):
         """
-- 
1.7.4.1





More information about the OfflineIMAP-project mailing list