aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Bobrov <breton@cynicmansion.ru>2016-01-22 10:32:35 +0300
committerBoris Bobrov <breton@cynicmansion.ru>2016-01-22 10:32:35 +0300
commit45189f6dfb50198a0ade35a4b560a7c592d4f610 (patch)
tree4bf4a71772b630ea46ea820b9e69bec4d85cc4df
parent45aa5360d6d2c7ac87b0fcb0330164a8b87cdbdf (diff)
parent64c035b39fe76bf07d8b12152d1f14574c9e4677 (diff)
downloadmediagoblin-45189f6dfb50198a0ade35a4b560a7c592d4f610.tar.lz
mediagoblin-45189f6dfb50198a0ade35a4b560a7c592d4f610.tar.xz
mediagoblin-45189f6dfb50198a0ade35a4b560a7c592d4f610.zip
Merge branch 'master' of git.sv.gnu.org:/srv/git/mediagoblin
-rw-r--r--mediagoblin/media_types/ascii/processing.py7
-rw-r--r--mediagoblin/media_types/image/processing.py3
-rw-r--r--mediagoblin/plugins/basic_auth/views.py3
3 files changed, 5 insertions, 8 deletions
diff --git a/mediagoblin/media_types/ascii/processing.py b/mediagoblin/media_types/ascii/processing.py
index ed6600ee..00d04e63 100644
--- a/mediagoblin/media_types/ascii/processing.py
+++ b/mediagoblin/media_types/ascii/processing.py
@@ -143,11 +143,8 @@ class CommonAsciiProcessor(MediaProcessor):
thumb = converter._create_image(
orig_file.read())
- with open(tmp_thumb, 'w') as thumb_file:
- thumb.thumbnail(
- thumb_size,
- Image.ANTIALIAS)
- thumb.save(thumb_file)
+ thumb.thumbnail(thumb_size, Image.ANTIALIAS)
+ thumb.save(tmp_thumb);
thumb_info = {'font': font,
'width': thumb_size[0],
diff --git a/mediagoblin/media_types/image/processing.py b/mediagoblin/media_types/image/processing.py
index 951a720d..14091d6e 100644
--- a/mediagoblin/media_types/image/processing.py
+++ b/mediagoblin/media_types/image/processing.py
@@ -77,8 +77,7 @@ def resize_image(entry, resized, keyname, target_name, new_size,
# Copy the new file to the conversion subdir, then remotely.
tmp_resized_filename = os.path.join(workdir, target_name)
- with open(tmp_resized_filename, 'wb') as resized_file:
- resized.save(resized_file, quality=quality)
+ resized.save(tmp_resized_filename, quality=quality)
store_public(entry, keyname, tmp_resized_filename, target_name)
# store the thumb/medium info
diff --git a/mediagoblin/plugins/basic_auth/views.py b/mediagoblin/plugins/basic_auth/views.py
index 95f91b4c..86d7eaef 100644
--- a/mediagoblin/plugins/basic_auth/views.py
+++ b/mediagoblin/plugins/basic_auth/views.py
@@ -63,7 +63,8 @@ def forgot_password(request):
messages.add_message(request,
messages.WARNING,
_("Couldn't find someone with that username."))
- return redirect(request, 'mediagoblin.auth.forgot_password')
+ return redirect(request,
+ 'mediagoblin.plugins.basic_auth.forgot_password')
success_message = _("An email has been sent with instructions "
"on how to change your password.")