#NEWLINE# def parse_config_variables( variables , method ) : #NEWLINE# #INDENT# if ( not variables ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# result = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if ( method == 'remove' ) : #NEWLINE# #INDENT# for var in variables : #NEWLINE# #INDENT# result [ var . strip ( ) ] = None #NEWLINE# #UNINDENT# #UNINDENT# if ( method == 'add' ) : #NEWLINE# #INDENT# for var in variables : #NEWLINE# #INDENT# if ( '=' in var ) : #NEWLINE# #INDENT# ( k , v ) = var . split ( '=' , 1 ) #NEWLINE# result [ k . strip ( ) ] = if_file_get_content ( v . strip ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# result [ var . strip ( ) ] = 'true' #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return json . dumps ( result )