From 29ba2fc523eede41faa1693157d703e5cf93f949 Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Mon, 2 Apr 2012 23:26:59 +0200 Subject: [PATCH] Warn about nonsensical config option 'sep' for IMAP repositories We autodetect the folder separator on IMAP servers and ignore any 'sep' setting in the repository section for IMAP servers. Detect if there is such a setting and warn the user about it. Signed-off-by: Sebastian Spaeth --- Changelog.draft.rst | 2 ++ offlineimap/repository/IMAP.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Changelog.draft.rst b/Changelog.draft.rst index d9c8aa1..5fdacac 100644 --- a/Changelog.draft.rst +++ b/Changelog.draft.rst @@ -44,5 +44,7 @@ Changes both the local AND remote name which caused unwanted behavior in combination with nametrans rules. Clarify in the help text. +* Some better output when using nonsensical configuration settings + Bug Fixes --------- diff --git a/offlineimap/repository/IMAP.py b/offlineimap/repository/IMAP.py index 28e73b7..5ad787a 100644 --- a/offlineimap/repository/IMAP.py +++ b/offlineimap/repository/IMAP.py @@ -33,6 +33,9 @@ class IMAPRepository(BaseRepository): self._host = None self.imapserver = imapserver.IMAPServer(self) self.folders = None + if self.getconf('sep', None): + self.ui.info("The 'sep' setting is being ignored for IMAP " + "repository '%s' (it's autodetected)" % self) def startkeepalive(self): keepalivetime = self.getkeepalive()