From 8ac579e8b5fca6a6ad4fe806f459bbeb8888df0d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 25 Mar 2007 11:35:16 +0000 Subject: [PATCH] Fix #28. Version bump. --- src/libprs500/__init__.py | 2 +- src/libprs500/books.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) 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))