From 089d42d62dcb5a648ff65d7dec17f9be6f98b92b Mon Sep 17 00:00:00 2001 From: karec Date: Fri, 6 Feb 2015 23:55:52 +0100 Subject: [PATCH] fix a bug for unicode string in utils.py for python3.2 support (current debian stable version) + add missing spaces arround operator for PEP8 --- ckeditor/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ckeditor/utils.py b/ckeditor/utils.py index c37361a..eb8dff8 100644 --- a/ckeditor/utils.py +++ b/ckeditor/utils.py @@ -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):