diff --git a/oml/meta/google.py b/oml/meta/google.py index 6c9b477..6c7ff4a 100644 --- a/oml/meta/google.py +++ b/oml/meta/google.py @@ -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] diff --git a/oml/nodes.py b/oml/nodes.py index d4d1dfd..4abf068 100644 --- a/oml/nodes.py +++ b/oml/nodes.py @@ -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):