#NEWLINE# def _mark_node_out_of_maintenance( maint_data , node ) : #NEWLINE# #INDENT# if ( 'windows' not in maint_data ) : #NEWLINE# #INDENT# raise ( 'Node %s is not currently under maintenance' % node ) #NEWLINE# #UNINDENT# maint_data [ 'windows' ] = [ window for window in maint_data [ 'windows' ] if ( not _is_stale_window ( window ) ) ] #NEWLINE# filtered_windows = [ ] #NEWLINE# for window in maint_data [ 'windows' ] : #NEWLINE# #INDENT# updated_window = _remove_node_from_window ( window , node ) #NEWLINE# if updated_window : #NEWLINE# #INDENT# filtered_windows . append ( updated_window ) #NEWLINE# #UNINDENT# #UNINDENT# maint_data [ 'windows' ] = filtered_windows #NEWLINE# if ( len ( maint_data [ 'windows' ] ) == 0 ) : #NEWLINE# #INDENT# del updated_window [ 'windows' ] #NEWLINE# #UNINDENT# return maint_data