#NEWLINE# def delete( self , args , options ) : #NEWLINE# #INDENT# if ( ( not os . path . exists ( self . web_config ) ) and ( not options [ 'skip_config' ] ) ) : #NEWLINE# #INDENT# raise CommandError ( ( 'A web site configuration does not exists in [%s] !' % self . install_dir ) ) #NEWLINE# #UNINDENT# if ( not options [ 'skip_config' ] ) : #NEWLINE# #INDENT# print ( 'Removing site configuration' ) #NEWLINE# os . remove ( self . web_config ) #NEWLINE# #UNINDENT# if ( not options [ 'skip_site' ] ) : #NEWLINE# #INDENT# site_name = options [ 'site_name' ] #NEWLINE# print ( 'Removing The site' ) #NEWLINE# if ( not self . run_config_command ( 'delete' , 'site' , site_name ) ) : #NEWLINE# #INDENT# raise CommandError ( ( 'Removing the site has failed with the following message :\n%s' % self . last_command_error ) ) #NEWLINE# #UNINDENT# print ( 'Removing The application pool' ) #NEWLINE# if ( not self . run_config_command ( 'delete' , 'apppool' , site_name ) ) : #NEWLINE# #INDENT# raise CommandError ( ( 'Removing the site has failed with the following message :\n%s' % self . last_command_error ) ) #NEWLINE# #UNINDENT# #UNINDENT# if ( not options [ 'skip_fastcgi' ] ) : #NEWLINE# #INDENT# print ( 'Removing FastCGI application' ) #NEWLINE# if ( not self . delete_fastcgi_section ( ) ) : #NEWLINE# #INDENT# raise CommandError ( 'The FastCGI application removal has failed' )