X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/fe8e5b5e224d32baebbdaa2fecf4a847ed4e5354..076474d2a928649c934b4bb12031d39cdea2c77d:/librarian/cover.py diff --git a/librarian/cover.py b/librarian/cover.py index b53de30..dc64a9c 100644 --- a/librarian/cover.py +++ b/librarian/cover.py @@ -4,7 +4,7 @@ # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # import re -import Image, ImageFont, ImageDraw, ImageFilter +from PIL import Image, ImageFont, ImageDraw, ImageFilter from StringIO import StringIO from librarian import get_resource, IOFile @@ -121,7 +121,10 @@ class Cover(object): } def __init__(self, book_info, format=None): - self.author = ", ".join(auth.readable() for auth in book_info.authors) + try: + self.author = ", ".join(auth.readable() for auth in book_info.authors) + except AttributeError: + self.author = "" self.title = book_info.title if format is not None: self.format = format