~sumanah/mailman/mailman

« back to all changes in this revision

Viewing changes to src/mailman/rest/moderation.py

  • Committer: Sumana Harihareswara
  • Date: 2015-01-08 21:35:58 UTC
  • mfrom: (7273.2.15 3.0)
  • Revision ID: sumanah@panix.com-20150108213558-65ym6553zj256z8p
mergeĀ fromĀ master

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2012-2014 by the Free Software Foundation, Inc.
 
1
# Copyright (C) 2012-2015 by the Free Software Foundation, Inc.
2
2
#
3
3
# This file is part of GNU Mailman.
4
4
#
17
17
 
18
18
"""REST API for Message moderation."""
19
19
 
20
 
from __future__ import absolute_import, print_function, unicode_literals
21
 
 
22
 
__metaclass__ = type
23
20
__all__ = [
24
21
    'HeldMessage',
25
22
    'HeldMessages',
88
85
        # resource.  Others we can drop.  Since we're mutating the dictionary,
89
86
        # we need to make a copy of the keys.  When you port this to Python 3,
90
87
        # you'll need to list()-ify the .keys() dictionary view.
91
 
        for key in resource.keys():
 
88
        for key in list(resource):
92
89
            if key in ('_mod_subject', '_mod_hold_date', '_mod_reason',
93
90
                       '_mod_sender', '_mod_message_id'):
94
91
                resource[key[5:]] = resource.pop(key)