[hooks/syncshema] fix logging level and nicer message (wrong changeset published previously)
--- a/hooks/syncschema.py Fri Aug 31 13:19:39 2012 +0200
+++ b/hooks/syncschema.py Fri Sep 07 13:48:55 2012 +0200
@@ -757,9 +757,9 @@
for sql in sqls:
try:
session.system_sql(sql)
- except Exception: # should be ProgrammingError
+ except Exception, exc: # should be ProgrammingError
if sql.startswith('DROP'):
- self.critical('execute of `%s` failed', sql)
+ self.error('execute of `%s` failed (cause: %s)', sql, exc)
continue
raise