aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/plugins/api/tools.py
diff options
context:
space:
mode:
authorBen Sturmfels <ben@sturm.com.au>2021-03-05 23:12:19 +1100
committerBen Sturmfels <ben@sturm.com.au>2021-03-05 23:12:19 +1100
commitdec47c7102cf0aa3a4debf002928db8e460c0d71 (patch)
tree47631fc15c7af172aa699506adf3d76d3a71976c /mediagoblin/plugins/api/tools.py
parent5f3a782fef4855e10b7259624a14d8afb0f7be93 (diff)
downloadmediagoblin-dec47c7102cf0aa3a4debf002928db8e460c0d71.tar.lz
mediagoblin-dec47c7102cf0aa3a4debf002928db8e460c0d71.tar.xz
mediagoblin-dec47c7102cf0aa3a4debf002928db8e460c0d71.zip
Apply `pyupgrade --py3-plus` to remove Python 2 compatibility code.
Diffstat (limited to 'mediagoblin/plugins/api/tools.py')
-rw-r--r--mediagoblin/plugins/api/tools.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mediagoblin/plugins/api/tools.py b/mediagoblin/plugins/api/tools.py
index e406888e..eff9009d 100644
--- a/mediagoblin/plugins/api/tools.py
+++ b/mediagoblin/plugins/api/tools.py
@@ -30,7 +30,7 @@ from mediagoblin.storage.filestorage import BasicFileStorage
_log = logging.getLogger(__name__)
-class Auth(object):
+class Auth:
'''
An object with two significant methods, 'trigger' and 'run'.
@@ -115,7 +115,7 @@ def api_auth(controller):
for auth in PluginManager().get_hook_callables('auth'):
if auth.trigger(request):
- _log.debug('{0} believes it is capable of authenticating this request.'.format(auth))
+ _log.debug('{} believes it is capable of authenticating this request.'.format(auth))
auth_candidates.append(auth)
# If we can't find any authentication methods, we should not let them
@@ -126,7 +126,7 @@ def api_auth(controller):
# For now, just select the first one in the list
auth = auth_candidates[0]
- _log.debug('Using {0} to authorize request {1}'.format(
+ _log.debug('Using {} to authorize request {}'.format(
auth, request.url))
if not auth(request, *args, **kw):