aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/plugins/piwigo/views.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/piwigo/views.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/piwigo/views.py')
-rw-r--r--mediagoblin/plugins/piwigo/views.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/mediagoblin/plugins/piwigo/views.py b/mediagoblin/plugins/piwigo/views.py
index 30c7ffa2..ecc7054e 100644
--- a/mediagoblin/plugins/piwigo/views.py
+++ b/mediagoblin/plugins/piwigo/views.py
@@ -121,7 +121,7 @@ def pwg_images_addSimple(request):
raise BadRequest()
dump = []
for f in form:
- dump.append("%s=%r" % (f.name, f.data))
+ dump.append("{}={!r}".format(f.name, f.data))
_log.info("addSimple: %r %s %r", request.form, " ".join(dump),
request.files)
@@ -133,8 +133,8 @@ def pwg_images_addSimple(request):
mg_app=request.app, user=request.user,
submitted_file=request.files['image'],
filename=request.files['image'].filename,
- title=six.text_type(form.name.data),
- description=six.text_type(form.comment.data))
+ title=str(form.name.data),
+ description=str(form.comment.data))
collection_id = form.category.data
if collection_id > 0:
@@ -151,7 +151,7 @@ def pwg_images_addSimple(request):
# Handle upload limit issues
except FileUploadLimit:
raise BadRequest(
- _(u'Sorry, the file size is too big.'))
+ _('Sorry, the file size is too big.'))
except UserUploadLimit:
raise BadRequest(
_('Sorry, uploading this file will put you over your'