aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author宋文武 <iyzsong@gmail.com>2016-01-12 11:37:21 +0800
committerChristopher Allan Webber <cwebber@dustycloud.org>2016-01-14 10:21:04 -0800
commit90c083aafe91ed1404709adc92a596f1b6a3dc99 (patch)
tree6cea0c9813bc3e80986f2755f837da7320378cc1
parent673bee80ff2ff4ed69acbd388d701bb9f680de1c (diff)
downloadmediagoblin-90c083aafe91ed1404709adc92a596f1b6a3dc99.tar.lz
mediagoblin-90c083aafe91ed1404709adc92a596f1b6a3dc99.tar.xz
mediagoblin-90c083aafe91ed1404709adc92a596f1b6a3dc99.zip
Use six.itervalues() in delete_media_files
-rw-r--r--mediagoblin/tools/files.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mediagoblin/tools/files.py b/mediagoblin/tools/files.py
index 848c86f2..2c486ac8 100644
--- a/mediagoblin/tools/files.py
+++ b/mediagoblin/tools/files.py
@@ -14,6 +14,8 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+import six
+
from mediagoblin import mg_globals
@@ -25,7 +27,7 @@ def delete_media_files(media):
- media: A MediaEntry document
"""
no_such_files = []
- for listpath in media.media_files.itervalues():
+ for listpath in six.itervalues(media.media_files):
try:
mg_globals.public_store.delete_file(
listpath)