diff options
Diffstat (limited to 'mediagoblin/gmg_commands/batchaddmedia.py')
-rw-r--r-- | mediagoblin/gmg_commands/batchaddmedia.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/mediagoblin/gmg_commands/batchaddmedia.py b/mediagoblin/gmg_commands/batchaddmedia.py index 86c9425f..8c5b8a09 100644 --- a/mediagoblin/gmg_commands/batchaddmedia.py +++ b/mediagoblin/gmg_commands/batchaddmedia.py @@ -21,8 +21,7 @@ import shutil import tempfile import requests -import six -from six.moves.urllib.parse import urlparse +from urllib.parse import urlparse from mediagoblin.db.models import LocalUser, MediaEntry from mediagoblin.gmg_commands import util as commands_util @@ -86,9 +85,6 @@ def batchaddmedia(args): all_metadata = open(abs_metadata_filename) media_metadata = csv.DictReader(all_metadata) for index, file_metadata in enumerate(media_metadata): - if six.PY2: - file_metadata = {k.decode('utf-8'): v.decode('utf-8') for k, v in file_metadata.items()} - files_attempted += 1 # In case the metadata was not uploaded initialize an empty dictionary. json_ld_metadata = compact_and_validate({}) @@ -146,8 +142,6 @@ Metadata was not uploaded.""".format( # `batchaddmedia` to upload a file larger than 200MB. media_file = tempfile.TemporaryFile() shutil.copyfileobj(res.raw, media_file) - if six.PY2: - media_file.seek(0) elif url.scheme == '': path = url.path |