def rollback ( self ) : try : if self . connection is not None : self . connection . rollback ( ) self . _updateCheckTime ( ) self . release ( ) except Exception , e : pass
how to best implement rollbacks in python
Rollback MySQL Transaction to database . MySQLDB : If the database and tables support transactions this rolls back ( cancels ) the current transaction ; otherwise a NotSupportedError is raised .
def rollback(self):
		"""
		Rollback MySQL Transaction to database.
		MySQLDB: If the database and tables support transactions, this rolls 
		back (cancels) the current transaction; otherwise a 
		NotSupportedError is raised.
		
		@author: Nick Verbeck
		@since: 5/12/2008
		"""
		try:
			if self.connection is not None:
				self.connection.rollback()
				self._updateCheckTime()
				self.release()
		except Exception, e:
			pass