openlp/openlp/core
Dave Warnock 913b0433f6 This update is a tidy up of the code that fixed bug #927473
Changes are made due to the following issues:

- the code assumed that exception OperationalError would only be thrown by  mySQL temporarily disappearing. However, other dbms can throw this exception and usually for errors that mean a retry will also fail.

- the code repeated the actual code of the method within the exception handler. This means code duplication and also that any new exceptions  are not handled by the same exception handler so for example their transaction will not get rolled back.

- not all potential dbms exceptions were caught and so in some cases the database transaction was not rolled back

The solution is to retry transactions where an OperationalError is thrown. Currently these are retried up to 3 times before the error is logged and the method returns false. By retrying the transaction we ensure that the same transaction code with the same exception handlers is used each time.

An additional catchall exception has been added where there is a transaction to ensure that it is rolled back. As with the OperationError this throws the exception back up the stack.
2012-06-10 22:45:02 +01:00
..
lib This update is a tidy up of the code that fixed bug #927473 2012-06-10 22:45:02 +01:00
theme pythonifying code: 2012-04-29 17:31:56 +02:00
ui Added ZionWorx importer. Added descriptionLabel to song import wizard. 2012-06-09 19:58:56 +01:00
utils Merge with trunk. Fixed conflict 2012-06-08 19:19:03 -04:00
__init__.py clean ups 2012-05-23 18:53:04 +02:00