diff options
| author | Barry Warsaw | 2013-08-27 22:14:44 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2013-08-27 22:14:44 -0400 |
| commit | 26c3adb4f457cfc41751aa0203efbb3582adeb2d (patch) | |
| tree | 90973bea29478795792cf36feec8cab6d4525d61 /src/mailman/rest/helpers.py | |
| parent | c175a7036261383b8e3440b5995886674f3f4d7c (diff) | |
| parent | 0120c079ed8c9a9b0b1bc5d8341ac2ec1a8638d3 (diff) | |
| download | mailman-26c3adb4f457cfc41751aa0203efbb3582adeb2d.tar.gz mailman-26c3adb4f457cfc41751aa0203efbb3582adeb2d.tar.zst mailman-26c3adb4f457cfc41751aa0203efbb3582adeb2d.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 |
