diff options
| author | Barry Warsaw | 2013-06-18 22:43:40 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2013-06-18 22:43:40 -0400 |
| commit | 0120c079ed8c9a9b0b1bc5d8341ac2ec1a8638d3 (patch) | |
| tree | 688f85ec38ae555389a6a34f10566c4f3a4dc179 /src/mailman/rest/helpers.py | |
| parent | 41059ed20ec668baf41cceaf539f8017171e9651 (diff) | |
| download | mailman-0120c079ed8c9a9b0b1bc5d8341ac2ec1a8638d3.tar.gz mailman-0120c079ed8c9a9b0b1bc5d8341ac2ec1a8638d3.tar.zst mailman-0120c079ed8c9a9b0b1bc5d8341ac2ec1a8638d3.zip | |
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 |
