#NEWLINE# def commit( self ) : #NEWLINE# #INDENT# ( q , self . _queue ) = ( self . _queue , [ ] ) #NEWLINE# if q : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# Database . connect ( self ) #NEWLINE# for ( sql , v ) in sql : #NEWLINE# #INDENT# Database . execute ( self , sql , v , commit = False ) #NEWLINE# #UNINDENT# Database . commit ( self ) #NEWLINE# #UNINDENT# except DatabaseError as e : #NEWLINE# #INDENT# Database . rollback ( self ) #NEWLINE# raise e