#NEWLINE# def execute( self , query , args = None ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# return self . cursor . execute ( args , args ) #NEWLINE# #UNINDENT# except Database . IntegrityError as e : #NEWLINE# #INDENT# six . reraise ( utils . IntegrityError , utils . IntegrityError ( * tuple ( e . args ) ) , sys . exc_info ( ) [ 2 ] ) #NEWLINE# #UNINDENT# except Database . OperationalError as e : #NEWLINE# #INDENT# if ( e [ 0 ] in self . codes_for_integrityerror ) : #NEWLINE# #INDENT# six . reraise ( utils . IntegrityError , utils . IntegrityError ( * tuple ( e . args ) ) , sys . exc_info ( ) [ 2 ] ) #NEWLINE# #UNINDENT# six . reraise ( utils . DatabaseError , utils . DatabaseError ( * tuple ( e . args ) ) , sys . exc_info ( ) [ 2 ] ) #NEWLINE# #UNINDENT# except Database . DatabaseError as e : #NEWLINE# #INDENT# six . reraise ( utils . DatabaseError , utils . DatabaseError ( * tuple ( e . args ) ) , sys . exc_info ( ) [ 2 ] )