diff options
| author | Barry Warsaw | 2013-09-03 10:46:15 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2013-09-03 10:46:15 -0400 |
| commit | b61c82e59655ed7090ecd7bbd6b0503ff305a9e4 (patch) | |
| tree | b4244c9e37bb57fe4efa06db00dcd04634e0ae64 /src/mailman/rest/helpers.py | |
| parent | f771f80d58a62b2a1eeffa9ff46d217c4760c69d (diff) | |
| parent | 6644023236f207652519a430109a1f6f2893370f (diff) | |
| download | mailman-b61c82e59655ed7090ecd7bbd6b0503ff305a9e4.tar.gz mailman-b61c82e59655ed7090ecd7bbd6b0503ff305a9e4.tar.zst mailman-b61c82e59655ed7090ecd7bbd6b0503ff305a9e4.zip | |
trunk merge
Diffstat (limited to 'src/mailman/rest/helpers.py')
| -rw-r--r-- | src/mailman/rest/helpers.py | 4 |
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 |
