On 2014-11-15 12:48, Chris Angelico wrote: > conn = establish_database_connection() > try: > do_stuff() > finally: > conn.rollback()
this sounds suspiciously like you'd never actually commit. Do you mean something like conn = establisth_database_connection() try: do_stuff(conn) except: conn.rollback() raise instead? I don't generally like bare excepts, but in this case, the exception just gets re-raised, so I feel Less Badâ„¢ about it (there's still the case where the rollback call raises some alternate exception, obfuscating the underlying root issue). -tkc -- https://mail.python.org/mailman/listinfo/python-list