Skip to content

Commit

Permalink
Update safaribooks.py
Browse files Browse the repository at this point in the history
  • Loading branch information
maxromanovsky authored Mar 9, 2018
1 parent 72b2c82 commit ce6a103
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions safaribooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ def create_content_opf(self):
for sub in self.book_info["subjects"])

return self.CONTENT_OPF.format(
(self.book_info["isbn"] if (isinstance(self.book_info["isbn"], str) and len(self.book_info["isbn"])) else self.book_id),
(self.book_info["isbn"] if self.book_info["isbn"] else self.book_id),
escape(self.book_title),
authors,
escape(self.book_info["description"]),
Expand Down Expand Up @@ -918,7 +918,7 @@ def create_toc(self):

navmap, _, max_depth = self.parse_toc(response)
return self.TOC_NCX.format(
(self.book_info["isbn"] if (isinstance(self.book_info["isbn"], str) and len(self.book_info["isbn"])) else self.book_id),
(self.book_info["isbn"] if self.book_info["isbn"] else self.book_id),
max_depth,
self.book_title,
", ".join(aut["name"] for aut in self.book_info["authors"]),
Expand Down

0 comments on commit ce6a103

Please sign in to comment.