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]
|
||||
|
||||
|
|
|
@ -262,7 +262,11 @@ class Node(Thread):
|
|||
return False
|
||||
if not changes:
|
||||
return False
|
||||
r = Changelog.apply_changes(u, changes, first=from_revision == 0)
|
||||
try:
|
||||
r = Changelog.apply_changes(u, changes, first=from_revision == 0)
|
||||
except:
|
||||
logger.debug('apply_changes failed', exc_info=True)
|
||||
r = False
|
||||
return r
|
||||
|
||||
def peering(self, action):
|
||||
|
|
Loading…
Reference in a new issue