This commit is contained in:
Kovid Goyal 2011-04-12 22:42:47 -06:00
parent 2bdc0c48a4
commit cf675d79d8

View File

@ -169,6 +169,11 @@ class ISBNDB(Source):
authors.append(au) authors.append(au)
if not authors: if not authors:
continue continue
comments = tostring(bd.find('Summary'))
if not comments:
# Require comments, since without them the result is useless
# anyway
continue
id_ = (title, tuple(authors)) id_ = (title, tuple(authors))
if id_ in seen: if id_ in seen:
continue continue
@ -177,8 +182,6 @@ class ISBNDB(Source):
continue continue
publisher = tostring(bd.find('PublisherText')) publisher = tostring(bd.find('PublisherText'))
if not publisher: publisher = None if not publisher: publisher = None
comments = tostring(bd.find('Summary'))
if not comments: comments = None
mi = Metadata(title, authors) mi = Metadata(title, authors)
mi.isbn = isbn mi.isbn = isbn
mi.publisher = publisher mi.publisher = publisher
@ -213,7 +216,8 @@ class ISBNDB(Source):
# }}} # }}}
if __name__ == '__main__': if __name__ == '__main__':
from threading import Event
s = ISBNDB(None) s = ISBNDB(None)
t, a = 'great gatsby', ['fitzgerald'] t, a = 'great gatsby', ['fitzgerald']
q = s.create_query(title=t, authors=a) q = s.create_query(title=t, authors=a)
s.make_query(q, title=t, authors=a) s.make_query(q, Event(), title=t, authors=a)