diff options
| author | Barry Warsaw | 2009-01-16 21:04:21 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2009-01-16 21:04:21 -0500 |
| commit | ae3d0cc316b826b8325507d960ccf84da601c3b0 (patch) | |
| tree | 3485e2ca463c2131a0ffb1693bc60d569cc9d8b7 /mailman/database/types.py | |
| parent | a3f7d07c62b2f7d6ac9d0b700883826c2838db60 (diff) | |
| download | mailman-ae3d0cc316b826b8325507d960ccf84da601c3b0.tar.gz mailman-ae3d0cc316b826b8325507d960ccf84da601c3b0.tar.zst mailman-ae3d0cc316b826b8325507d960ccf84da601c3b0.zip | |
Diffstat (limited to 'mailman/database/types.py')
| -rw-r--r-- | mailman/database/types.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/mailman/database/types.py b/mailman/database/types.py index 17719c941..2f901fe49 100644 --- a/mailman/database/types.py +++ b/mailman/database/types.py @@ -15,6 +15,12 @@ # You should have received a copy of the GNU General Public License along with # GNU Mailman. If not, see <http://www.gnu.org/licenses/>. +"""Storm type conversions.""" + + +from __future__ import absolute_import, unicode_literals + +__metaclass__ = type __all__ = [ 'Enum', ] @@ -46,9 +52,10 @@ class _EnumVariable(Variable): return None if not to_db: return value - return '%s.%s:%d' % (value.enumclass.__module__, - value.enumclass.__name__, - int(value)) + return '{0}.{1}:{2}'.format( + value.enumclass.__module__, + value.enumclass.__name__, + int(value)) class Enum(SimpleProperty): |
