More tolerance for bad url metadata.
[wolnelektury.git] / apps / sponsors / models.py
index cbc8d9b..fd3c3a9 100644 (file)
@@ -64,7 +64,7 @@ class SponsorPage(models.Model):
             simg = Image.open(sponsors[sponsor_id].logo.path)
             if simg.size[0] > THUMB_WIDTH or simg.size[1] > THUMB_HEIGHT:
                 size = (
             simg = Image.open(sponsors[sponsor_id].logo.path)
             if simg.size[0] > THUMB_WIDTH or simg.size[1] > THUMB_HEIGHT:
                 size = (
-                    min(THUMB_WIDTH, 
+                    min(THUMB_WIDTH,
                         simg.size[0] * THUMB_HEIGHT / simg.size[1]),
                     min(THUMB_HEIGHT,
                         simg.size[1] * THUMB_WIDTH / simg.size[0])
                         simg.size[0] * THUMB_HEIGHT / simg.size[1]),
                     min(THUMB_HEIGHT,
                         simg.size[1] * THUMB_WIDTH / simg.size[0])