Keywords: avoid warning at each message when no keywords are used

This fix does not apply when any keyword in configured which is already
harmless.

Written-by: Igor Almeida <igor.contato@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Nicolas Sebrecht 2015-11-22 19:52:32 +01:00
parent def087eeea
commit d6077a09cf
2 changed files with 4 additions and 1 deletions

View File

@ -920,6 +920,9 @@ class BaseFolder(object):
try:
keywordmap = dstfolder.getrepository().getkeywordmap()
if keywordmap is None:
return selfflags
knownkeywords = set(keywordmap.keys())
selfkeywords = self.getmessagekeywords(uid)

View File

@ -81,7 +81,7 @@ class MaildirRepository(BaseRepository):
return self.getconf('sep', '.').strip()
def getkeywordmap(self):
return self.keyword2char
return self.keyword2char if len(self.keyword2char) > 0 else None
def makefolder(self, foldername):
"""Create new Maildir folder if necessary