projects
/
mediagoblin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
673bee8
)
Use six.itervalues() in delete_media_files
author
宋文武
<iyzsong@gmail.com>
Tue, 12 Jan 2016 03:37:21 +0000
(11:37 +0800)
committer
Christopher Allan Webber
<cwebber@dustycloud.org>
Thu, 14 Jan 2016 18:21:04 +0000
(10:21 -0800)
mediagoblin/tools/files.py
patch
|
blob
|
blame
|
history
diff --git
a/mediagoblin/tools/files.py
b/mediagoblin/tools/files.py
index 848c86f24fd467c3eb7789755c5edb26df56749c..2c486ac88c418098ef3a31a4890b62e3fad7ac10 100644
(file)
--- 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)