fix a bug for unicode string in utils.py for python3.2 support (current debian stable version) + add missing spaces arround operator for PEP8

This commit is contained in:
karec 2015-02-06 23:55:52 +01:00
parent 6a2b7f7480
commit 089d42d62d
1 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ def get_slugified_name(filename):
def get_random_string():
return ''.join(random.sample(string.ascii_lowercase*6, 6))
return ''.join(random.sample(string.ascii_lowercase * 6, 6))
def get_thumb_filename(file_name):
@ -32,7 +32,7 @@ def get_thumb_filename(file_name):
Generate thumb filename by adding _thumb to end of
filename before . (if present)
"""
return u'{0}_thumb{1}'.format(*os.path.splitext(file_name))
return unicode('{0}_thumb{1}').format(*os.path.splitext(file_name))
def get_image_format(extension):