[close #139] Fix UnicodeErrors in management command.

This commit is contained in:
Piotr Maliński 2014-11-02 17:17:55 +01:00
parent bdb904ea08
commit fad19780b0
1 changed files with 2 additions and 2 deletions

View File

@ -18,11 +18,11 @@ class Command(NoArgsCommand):
backend = get_backend()
for image in get_image_files():
if not os.path.isfile(get_thumb_filename(image)):
self.stdout.write("Creating thumbnail for {0}".format(image))
self.stdout.write("Creating thumbnail for %s" % image)
try:
backend.create_thumbnail(image)
except Exception as e:
self.stdout.write("Couldn't create thumbnail for {0}: {1}".format(image, e))
self.stdout.write("Couldn't create thumbnail for %s: %s" % (image, e))
self.stdout.write("Finished")
else:
self.stdout.write("No thumbnail backend is enabled")