diff --git a/src/libprs500/__init__.py b/src/libprs500/__init__.py index 576c8601f2..c1b969ef4d 100644 --- a/src/libprs500/__init__.py +++ b/src/libprs500/__init__.py @@ -37,7 +37,7 @@ You may have to adjust the GROUP and the location of the rules file to suit your distribution. """ -__version__ = "0.3.9" +__version__ = "0.3.10" __docformat__ = "epytext" __author__ = "Kovid Goyal " diff --git a/src/libprs500/books.py b/src/libprs500/books.py index 95263cf67c..37119edd3b 100644 --- a/src/libprs500/books.py +++ b/src/libprs500/books.py @@ -189,8 +189,11 @@ class BookList(list): "mime":mime, "path":name, "size":str(size)} for attr in attrs.keys(): node.setAttributeNode(self.document.createAttribute(attr)) - node.setAttribute(attr, attrs[attr]) - w, h, data = info["cover"] + node.setAttribute(attr, attrs[attr]) + try: + w, h, data = info["cover"] + except TypeError: + w, h, data = None, None, None if data: th = self.document.createElement(self.prefix + "thumbnail") th.setAttribute("width", str(w))