Use six.itervalues() in delete_media_files
This commit is contained in:
parent
673bee80ff
commit
90c083aafe
@ -14,6 +14,8 @@
|
|||||||
# You should have received a copy of the GNU Affero General Public License
|
# 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/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
import six
|
||||||
|
|
||||||
from mediagoblin import mg_globals
|
from mediagoblin import mg_globals
|
||||||
|
|
||||||
|
|
||||||
@ -25,7 +27,7 @@ def delete_media_files(media):
|
|||||||
- media: A MediaEntry document
|
- media: A MediaEntry document
|
||||||
"""
|
"""
|
||||||
no_such_files = []
|
no_such_files = []
|
||||||
for listpath in media.media_files.itervalues():
|
for listpath in six.itervalues(media.media_files):
|
||||||
try:
|
try:
|
||||||
mg_globals.public_store.delete_file(
|
mg_globals.public_store.delete_file(
|
||||||
listpath)
|
listpath)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user