#NEWLINE# @ log . log_method_call #NEWLINE# def delete_policy_rule_set( self , context , policy_rule_set_id ) : #NEWLINE# #INDENT# with context . session . begin ( subtransactions = True ) : #NEWLINE# #INDENT# prs_db = self . _get_policy_rule_set ( context , policy_rule_set_id ) #NEWLINE# prs_ids = ( self . _get_ptgs_for_providing_policy_rule_set ( context , policy_rule_set_id ) or self . _get_ptgs_for_consuming_policy_rule_set ( context , policy_rule_set_id ) or self . _get_eps_for_providing_policy_rule_set ( context , policy_rule_set_id ) or self . _get_eps_for_consuming_policy_rule_set ( context , policy_rule_set_id ) ) #NEWLINE# if prs_ids : #NEWLINE# #INDENT# raise gpolicy . PolicyRuleSetInUse ( policy_rule_set_id = policy_rule_set_id ) #NEWLINE# #UNINDENT# context . session . delete ( prs_db )