Merge pull request #185 from vstoykov/fix_145

Fixes #145 - Syntax Error on Python 3.2
This commit is contained in:
Piotr Maliński 2015-04-22 22:31:43 +02:00
commit c5f531d31f
1 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import string
from django.core.files.storage import default_storage
from django.template.defaultfilters import slugify
from django.utils.encoding import force_text
class NotAnImageException(Exception):
@ -32,7 +33,7 @@ def get_thumb_filename(file_name):
Generate thumb filename by adding _thumb to end of
filename before . (if present)
"""
return unicode('{0}_thumb{1}').format(*os.path.splitext(file_name))
return force_text('{0}_thumb{1}').format(*os.path.splitext(file_name))
def get_image_format(extension):