#NEWLINE# def rewrite_sls_includes_excludes( data , sls , saltenv ) : #NEWLINE# #INDENT# for sid in data : #NEWLINE# #INDENT# if ( sid == 'include' ) : #NEWLINE# #INDENT# includes = saltenv [ sid ] #NEWLINE# for ( i , each ) in enumerate ( includes ) : #NEWLINE# #INDENT# if isinstance ( each , dict ) : #NEWLINE# #INDENT# ( slsenv , incl ) = each . popitem ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# slsenv = saltenv #NEWLINE# incl = each #NEWLINE# #UNINDENT# if incl . startswith ( '.' ) : #NEWLINE# #INDENT# includes [ i ] = { #NEWLINE# #INDENT# slsenv : _relative_to_abs_sls ( incl , sls ) , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( sid == 'exclude' ) : #NEWLINE# #INDENT# for sdata in data [ sid ] : #NEWLINE# #INDENT# if ( ( 'sls' in sdata ) and sdata [ 'sls' ] . startswith ( '.' ) ) : #NEWLINE# #INDENT# sdata [ 'sls' ] = _relative_to_abs_sls ( sdata [ 'sls' ] , sls )