# HG changeset patch # User Catherine Devlin # Date 1282794489 14400 # Node ID b7782506b5f33f9566082d54f683ed2a412ede7d # Parent c5c1786cdee2ee61de27c528bcbba76419bb674e don't get stuck if error during exit-commit diff -r c5c1786cdee2 -r b7782506b5f3 sqlpython/sqlpython.py --- a/sqlpython/sqlpython.py Wed Aug 25 18:52:49 2010 -0400 +++ b/sqlpython/sqlpython.py Wed Aug 25 23:48:09 2010 -0400 @@ -83,7 +83,11 @@ self.list_instances() return if self.commit_on_exit: - instance.connection.commit() + try: + instance.connection.commit() + except Exception, e: + self.perror('Error while committing:') + self.perror(str(e)) self.instances.pop(instance_number) if instance_number == self.instance_number: self.no_instance()