mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
pep8
This commit is contained in:
parent
fb970e24c6
commit
a1f0c360e7
@ -64,7 +64,7 @@ class Ozon(Source):
|
||||
|
||||
# for ozon.ru search we have to format ISBN with '-'
|
||||
isbn = _format_isbn(log, identifiers.get('isbn', None))
|
||||
if isbn and not '-' in isbn:
|
||||
if isbn and '-' not in isbn:
|
||||
log.error("%s requires formatted ISBN for search. %s cannot be formated - removed. (only Russian ISBN format is supported now)"
|
||||
% (self.name, isbn))
|
||||
isbn = None
|
||||
@ -96,7 +96,7 @@ class Ozon(Source):
|
||||
|
||||
def identify(self, log, result_queue, abort, title=None, authors=None,
|
||||
identifiers={}, timeout=90): # {{{
|
||||
from lxml import html, etree
|
||||
from lxml import html
|
||||
from calibre.ebooks.chardet import xml_to_unicode
|
||||
|
||||
if not self.is_configured():
|
||||
@ -258,7 +258,7 @@ class Ozon(Source):
|
||||
ozon_id = mi.identifiers['ozon']
|
||||
|
||||
try:
|
||||
self.get_book_details(log, mi, timeout, cachedPagesDict[ozon_id] if cachedPagesDict and cachedPagesDict.has_key(ozon_id) else None)
|
||||
self.get_book_details(log, mi, timeout, cachedPagesDict[ozon_id] if cachedPagesDict and ozon_id in cachedPagesDict else None)
|
||||
except:
|
||||
log.exception(u'Failed to get details for metadata: %s' % mi.title)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user