Changeset 3907 for TI01-discovery


Ignore:
Timestamp:
19/05/08 17:13:32 (11 years ago)
Author:
cbyrom
Message:

Add rollback to db funcs - to allow processing to continue correctly if
an error is experienced during a DB operation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery/branches/ingestAutomation-upgrade/OAIBatch/db_funcs.py

    r3852 r3907  
    3333            cursor.execute(sqlCmd) 
    3434        except: 
    35             sys.exit("Error: database error %s %s" %(sys.exc_type, sys.exc_value)) 
     35                connection.rollback() 
     36                raise SystemError, "Error: database error %s %s" %(sys.exc_type, sys.exc_value) 
     37            
    3638        connection.commit() 
    3739        logging.info("SQL command completed successfully") 
Note: See TracChangeset for help on using the changeset viewer.