Skip to content

Commit

Permalink
Generator erroneously used as list
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Mar 18, 2017
1 parent e3edc50 commit 8433f1d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/calibre/ebooks/metadata/sources/amazon.py
Original file line number Diff line number Diff line change
Expand Up @@ -1072,8 +1072,8 @@ def create_query(self, log, title=None, authors=None, identifiers={}, # {{{
q['field-title'] = ' '.join(title_tokens)
terms.extend(title_tokens)
if authors:
author_tokens = self.get_author_tokens(authors,
only_first_author=True)
author_tokens = list(self.get_author_tokens(authors,
only_first_author=True))
if author_tokens:
q['field-author'] = ' '.join(author_tokens)
terms.extend(author_tokens)
Expand Down
4 changes: 2 additions & 2 deletions src/calibre/ebooks/metadata/sources/douban.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ def build_term(prefix, parts):
title_tokens = list(self.get_title_tokens(title))
if title_tokens:
q += build_term('title', title_tokens)
author_tokens = self.get_author_tokens(authors,
only_first_author=True)
author_tokens = list(self.get_author_tokens(authors,
only_first_author=True))
if author_tokens:
q += ((' ' if q != '' else '') +
build_term('author', author_tokens))
Expand Down
2 changes: 1 addition & 1 deletion src/calibre/ebooks/metadata/sources/google.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def build_term(prefix, parts):
title_tokens = list(self.get_title_tokens(title))
if title_tokens:
q += build_term('title', title_tokens)
author_tokens = self.get_author_tokens(authors, only_first_author=True)
author_tokens = list(self.get_author_tokens(authors, only_first_author=True))
if author_tokens:
q += ('+' if q else '') + build_term('author', author_tokens)

Expand Down

0 comments on commit 8433f1d

Please sign in to comment.