summaryrefslogtreecommitdiff
path: root/src/mailman/rest/helpers.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/rest/helpers.py')
-rw-r--r--src/mailman/rest/helpers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mailman/rest/helpers.py b/src/mailman/rest/helpers.py
index 3a548cb10..7d911d42b 100644
--- a/src/mailman/rest/helpers.py
+++ b/src/mailman/rest/helpers.py
@@ -36,7 +36,7 @@ import hashlib
from cStringIO import StringIO
from datetime import datetime, timedelta
-from flufl.enum import Enum
+from enum import Enum
from lazr.config import as_boolean
from restish import http
from restish.http import Response
@@ -79,7 +79,7 @@ class ExtendedEncoder(json.JSONEncoder):
seconds = obj.seconds + obj.microseconds / 1000000.0
return '{0}d{1}s'.format(obj.days, seconds)
return '{0}d'.format(obj.days)
- elif hasattr(obj, 'enum') and issubclass(obj.enum, Enum):
+ elif isinstance(obj, Enum):
# It's up to the decoding validator to associate this name with
# the right Enum class.
return obj.name