summaryrefslogtreecommitdiff
path: root/src/leap/mail/imap
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2015-01-02 21:05:22 -0600
committerKali Kaneko <kali@leap.se>2015-01-05 11:05:14 -0400
commit87433821ad3ade5440814ffe9950e04c211a7a4c (patch)
tree8ab6b5df30943dc031d966e44c5a481568f7b6cc /src/leap/mail/imap
parenta3acaed8512c16fc1d53141d288d60eacc6ef94e (diff)
Port `enum` to `enum34`
Diffstat (limited to 'src/leap/mail/imap')
-rw-r--r--src/leap/mail/imap/memorystore.py10
-rw-r--r--src/leap/mail/imap/messageparts.py2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/leap/mail/imap/memorystore.py b/src/leap/mail/imap/memorystore.py
index 5eea4ef..e075394 100644
--- a/src/leap/mail/imap/memorystore.py
+++ b/src/leap/mail/imap/memorystore.py
@@ -52,10 +52,10 @@ logger = logging.getLogger(__name__)
# soledad storage, in seconds.
SOLEDAD_WRITE_PERIOD = 15
-FDOC = MessagePartType.fdoc.key
-HDOC = MessagePartType.hdoc.key
-CDOCS = MessagePartType.cdocs.key
-DOCS_ID = MessagePartType.docs_id.key
+FDOC = MessagePartType.fdoc.name
+HDOC = MessagePartType.hdoc.name
+CDOCS = MessagePartType.cdocs.name
+DOCS_ID = MessagePartType.docs_id.name
@contextlib.contextmanager
@@ -73,7 +73,7 @@ def set_bool_flag(obj, att):
setattr(obj, att, False)
-DirtyState = Enum("none", "dirty", "new")
+DirtyState = Enum("DirtyState", "none dirty new")
class MemoryStore(object):
diff --git a/src/leap/mail/imap/messageparts.py b/src/leap/mail/imap/messageparts.py
index 257721c..fb1d75a 100644
--- a/src/leap/mail/imap/messageparts.py
+++ b/src/leap/mail/imap/messageparts.py
@@ -32,7 +32,7 @@ from leap.mail.imap import interfaces
from leap.mail.imap.fields import fields
from leap.mail.utils import empty, first, find_charset
-MessagePartType = Enum("hdoc", "fdoc", "cdoc", "cdocs", "docs_id")
+MessagePartType = Enum("MessagePartType", "hdoc fdoc cdoc cdocs docs_id")
logger = logging.getLogger(__name__)