#NEWLINE# def write_config( config , config_path ) : #NEWLINE# #INDENT# logger . debug ( 'Writing global config...' ) #NEWLINE# parent_directory = os . path . dirname ( config_path ) #NEWLINE# if ( not os . path . exists ( parent_directory ) ) : #NEWLINE# #INDENT# os . makedirs ( parent_directory ) #NEWLINE# #UNINDENT# with open ( config_path , 'w+' ) as fh : #NEWLINE# #INDENT# config . write ( fh )