diff options
Diffstat (limited to 'mediagoblin/gmg_commands')
-rw-r--r-- | mediagoblin/gmg_commands/__init__.py | 2 | ||||
-rw-r--r-- | mediagoblin/gmg_commands/addmedia.py | 4 | ||||
-rw-r--r-- | mediagoblin/gmg_commands/batchaddmedia.py | 8 | ||||
-rw-r--r-- | mediagoblin/gmg_commands/dbupdate.py | 1 | ||||
-rw-r--r-- | mediagoblin/gmg_commands/users.py | 2 | ||||
-rw-r--r-- | mediagoblin/gmg_commands/util.py | 4 |
6 files changed, 2 insertions, 19 deletions
diff --git a/mediagoblin/gmg_commands/__init__.py b/mediagoblin/gmg_commands/__init__.py index 963c3952..47ebd0c9 100644 --- a/mediagoblin/gmg_commands/__init__.py +++ b/mediagoblin/gmg_commands/__init__.py @@ -18,8 +18,6 @@ import argparse import os import shutil -import six - from mediagoblin.tools.common import import_component import logging diff --git a/mediagoblin/gmg_commands/addmedia.py b/mediagoblin/gmg_commands/addmedia.py index fbec7071..f8bd1715 100644 --- a/mediagoblin/gmg_commands/addmedia.py +++ b/mediagoblin/gmg_commands/addmedia.py @@ -17,8 +17,6 @@ import os -import six - from mediagoblin.db.models import LocalUser from mediagoblin.gmg_commands import util as commands_util from mediagoblin.submit.lib import ( @@ -93,8 +91,6 @@ def addmedia(args): # this is kinda terrible if some_string is None: return None - if six.PY2: - return str(some_string, 'utf-8') return some_string try: 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 diff --git a/mediagoblin/gmg_commands/dbupdate.py b/mediagoblin/gmg_commands/dbupdate.py index 988c0e26..c62de91e 100644 --- a/mediagoblin/gmg_commands/dbupdate.py +++ b/mediagoblin/gmg_commands/dbupdate.py @@ -16,7 +16,6 @@ import logging -import six from alembic import command from sqlalchemy.orm import sessionmaker diff --git a/mediagoblin/gmg_commands/users.py b/mediagoblin/gmg_commands/users.py index b61a5571..4d4740ca 100644 --- a/mediagoblin/gmg_commands/users.py +++ b/mediagoblin/gmg_commands/users.py @@ -17,8 +17,6 @@ import sys -import six - from mediagoblin.db.models import LocalUser from mediagoblin.gmg_commands import util as commands_util from mediagoblin import auth diff --git a/mediagoblin/gmg_commands/util.py b/mediagoblin/gmg_commands/util.py index f27a9535..15300ace 100644 --- a/mediagoblin/gmg_commands/util.py +++ b/mediagoblin/gmg_commands/util.py @@ -18,8 +18,6 @@ from mediagoblin import app import getpass -import six - def setup_app(args): """ @@ -35,7 +33,7 @@ def prompt_if_not_set(variable, text, password=False): """ if variable is None: if not password: - variable = six.moves.input(text + ' ') + variable = input(text + ' ') else: variable=getpass.getpass(text + ' ') |