diff options
author | Asbjørn Sloth Tønnesen <ast@fiberby.net> | 2019-09-07 13:05:13 +0000 |
---|---|---|
committer | Asbjørn Sloth Tønnesen <ast@fiberby.net> | 2019-09-07 13:05:13 +0000 |
commit | 4d60befb6d323adb638941d41ba7f5fda9f070cc (patch) | |
tree | e9c8de699bee2afbd3833876a31a0b95c6636011 | |
parent | ba9677bb29a3a7db7618133be5e4e1a9248e5059 (diff) | |
download | peeringdb-simplesync-4d60befb6d323adb638941d41ba7f5fda9f070cc.tar.gz peeringdb-simplesync-4d60befb6d323adb638941d41ba7f5fda9f070cc.tar.xz peeringdb-simplesync-4d60befb6d323adb638941d41ba7f5fda9f070cc.zip |
print the data that triggered an error
Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>
-rwxr-xr-x | sync.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -77,7 +77,11 @@ def update_object(kind, obj): t[key] = None t['data'] = json.dumps(obj) cur = conn.cursor() - cur.execute(comp, t) + try: + cur.execute(comp, t) + except: + print(kind, t['id'], t['data']) + raise def last_updated(kind): comp = sql.SQL('SELECT EXTRACT(EPOCH FROM MAX(updated)) - 1 FROM {}.{};' |