# HG changeset patch # User Julien Cristau # Date 1390301822 -3600 # Node ID 6b673cb4d3b64c74f849be75a2ada805528469d3 # Parent 3809e93c33b881b94c69f5a8be375c19d0c03e6f [migractions] Don't silently ignore errors when installing sql procedures If we're going to ignore errors, at least be loud about it. sqlexec already wraps the sql execution in a try/except block, so we were never going to catch any exceptions in the caller. Check the return value instead. Closes #3459618. diff -r 3809e93c33b8 -r 6b673cb4d3b6 server/migractions.py --- a/server/migractions.py Tue Jan 21 10:20:49 2014 +0100 +++ b/server/migractions.py Tue Jan 21 11:57:02 2014 +0100 @@ -395,11 +395,10 @@ sql_scripts = glob(osp.join(directory, '*.%s.sql' % driver)) for fpath in sql_scripts: print '-> installing', fpath - try: - sqlexec(open(fpath).read(), self.session.system_sql, False, - delimiter=';;') - except Exception as exc: - print '-> ERROR:', exc, ', skipping', fpath + failed = sqlexec(open(fpath).read(), self.session.system_sql, False, + delimiter=';;') + if failed: + print '-> ERROR, skipping', fpath # schema synchronization internals ########################################