#NEWLINE# @ log . log_method_call #NEWLINE# def delete_external_policy( self , context , external_policy_id , check_unused = False ) : #NEWLINE# #INDENT# session = context . session #NEWLINE# with session . begin ( subtransactions = True ) : #NEWLINE# #INDENT# es = self . get_external_policy ( context , external_policy_id ) #NEWLINE# policy_context = p_context . ExternalPolicyContext ( self , context , check_unused ) #NEWLINE# self . policy_driver_manager . delete_external_policy_precommit ( policy_context ) #NEWLINE# super ( GroupPolicyPlugin , self ) . delete_external_policy ( context , external_policy_id ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# self . policy_driver_manager . delete_external_policy_postcommit ( policy_context ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# LOG . exception ( _LE ( 'delete_external_policy_postcommit failed for external_policy %s' ) , external_policy_id )