Shorten self.infosep assignment

A more pythonic and less verbose way to do the same. Add a comment what the
variable is all about.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth 2011-08-30 11:01:17 +02:00
parent 1ac9dc7fb4
commit a43677a3e6

View File

@ -68,11 +68,8 @@ class MaildirFolder(BaseFolder):
self.wincompatible = self.config.getdefaultboolean(
"Account "+self.accountname, "maildir-windows-compatible", False)
if self.wincompatible == False:
self.infosep = ':'
else:
self.infosep = '!'
self.infosep = '!' if self.wincompatible else ':'
"""infosep is the separator between maildir name and flag appendix"""
self.flagmatchre = re.compile(self.infosep + '.*2,([A-Z]+)')
#self.ui is set in BaseFolder.init()
# Cache the full folder path, as we use getfullname() very often