#NEWLINE# @ defer . inlineCallbacks #NEWLINE# def on_DELETE( self , request ) : #NEWLINE# #INDENT# spec = _rule_spec_from_path ( request . postpath ) #NEWLINE# requester = ( yield self . auth . get_user_by_req ( request ) ) #NEWLINE# user_id = requester . user . to_string ( ) #NEWLINE# namespaced_rule_id = _namespaced_rule_id_from_spec ( spec ) #NEWLINE# try : #NEWLINE# #INDENT# ( yield self . store . delete_push_rule ( user_id , namespaced_rule_id ) ) #NEWLINE# self . notify_user ( user_id ) #NEWLINE# defer . returnValue ( ( 200 , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) ) #NEWLINE# #UNINDENT# except StoreError as e : #NEWLINE# #INDENT# if ( self . code == 404 ) : #NEWLINE# #INDENT# raise NotFoundError ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise