catch more errors in debug log
This commit is contained in:
parent
adf2eef34a
commit
6b70fa36c7
2 changed files with 7 additions and 3 deletions
|
|
@ -52,7 +52,7 @@ def info(key, value):
|
|||
api_limit.error = True
|
||||
raise IOError(url, r)
|
||||
if not 'items' in r:
|
||||
print('unknown %s: %s [%s]' % (key, value, r))
|
||||
logger.debug('unknown %s: %s [%s]', key, value, r)
|
||||
return {}
|
||||
_data = r['items'][0]['volumeInfo']
|
||||
_id = r['items'][0]['id']
|
||||
|
|
@ -91,7 +91,7 @@ def info(key, value):
|
|||
data['isbn'] = []
|
||||
data['isbn'].append(k['identifier'])
|
||||
else:
|
||||
print('unknown identifier', k)
|
||||
logger.debug('unknown identifier %s', k)
|
||||
if 'isbn' in data:
|
||||
data['isbn'] = [to_isbn13(i) for i in data['isbn']][0]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue