Mercurial > libervia-backend
diff src/plugins/plugin_misc_maildir.py @ 916:1a759096ccbd
core: use of Const for profile_key + replaced '@DEFAULT@' default profile_key by '@NONE@'
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 21 Mar 2014 16:27:09 +0100 |
parents | bfabeedbf32e |
children | 301b342c697a |
line wrap: on
line diff
--- a/src/plugins/plugin_misc_maildir.py Fri Mar 21 16:19:46 2014 +0100 +++ b/src/plugins/plugin_misc_maildir.py Fri Mar 21 16:27:09 2014 +0100 @@ -18,6 +18,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. from sat.core.i18n import _ +from sat.core.constants import Const as C from logging import debug, info, error import warnings warnings.filterwarnings('ignore', 'the MimeWriter', DeprecationWarning, 'twisted') # FIXME: to be removed, see http://twistedmatrix.com/trac/ticket/4038 @@ -100,7 +101,7 @@ self.accessMessageBox("INBOX", profile_key=profile).addMessage(message) return False - def accessMessageBox(self, boxname, observer=None, profile_key='@DEFAULT@'): + def accessMessageBox(self, boxname, observer=None, profile_key=C.PROF_KEY_NONE): """Create and return a MailboxUser instance @param boxname: name of the box @param observer: method to call when a NewMessage arrive""" @@ -327,7 +328,7 @@ mail['Subject'] = e.children[0].encode('utf-8') return mail.as_string() - def __init__(self, _maildir, name, observer=None, profile="@NONE@"): + def __init__(self, _maildir, name, observer=None, profile=C.PROF_KEY_NONE): """@param _maildir: the main MaildirBox instance @param name: name of the mailbox @param profile: real profile (ie not a profile_key)