#NEWLINE# def _delete_network( self , request , network ) : #NEWLINE# #INDENT# 'Delete the created network when subnet creation failed.' #NEWLINE# try : #NEWLINE# #INDENT# api . neutron . network_delete ( request , network . id ) #NEWLINE# msg = ( _ ( 'Delete the created network "%s" due to subnet creation failure.' ) % network . name ) #NEWLINE# LOG . debug ( msg ) #NEWLINE# redirect = self . get_failure_url ( ) #NEWLINE# messages . info ( request , msg ) #NEWLINE# raise exceptions . Http302 ( redirect ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# msg = ( _ ( 'Failed to delete network "%s"' ) % network . name ) #NEWLINE# LOG . info ( msg ) #NEWLINE# redirect = self . get_failure_url ( ) #NEWLINE# exceptions . handle ( network , msg , redirect = redirect )