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
|
api_limit.error = True
|
||||||
raise IOError(url, r)
|
raise IOError(url, r)
|
||||||
if not 'items' in r:
|
if not 'items' in r:
|
||||||
print('unknown %s: %s [%s]' % (key, value, r))
|
logger.debug('unknown %s: %s [%s]', key, value, r)
|
||||||
return {}
|
return {}
|
||||||
_data = r['items'][0]['volumeInfo']
|
_data = r['items'][0]['volumeInfo']
|
||||||
_id = r['items'][0]['id']
|
_id = r['items'][0]['id']
|
||||||
|
@ -91,7 +91,7 @@ def info(key, value):
|
||||||
data['isbn'] = []
|
data['isbn'] = []
|
||||||
data['isbn'].append(k['identifier'])
|
data['isbn'].append(k['identifier'])
|
||||||
else:
|
else:
|
||||||
print('unknown identifier', k)
|
logger.debug('unknown identifier %s', k)
|
||||||
if 'isbn' in data:
|
if 'isbn' in data:
|
||||||
data['isbn'] = [to_isbn13(i) for i in data['isbn']][0]
|
data['isbn'] = [to_isbn13(i) for i in data['isbn']][0]
|
||||||
|
|
||||||
|
|
|
@ -262,7 +262,11 @@ class Node(Thread):
|
||||||
return False
|
return False
|
||||||
if not changes:
|
if not changes:
|
||||||
return False
|
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
|
return r
|
||||||
|
|
||||||
def peering(self, action):
|
def peering(self, action):
|
||||||
|
|
Loading…
Reference in a new issue