#NEWLINE# def get_config_parser( env ) : #NEWLINE# #INDENT# fname = env . get ( 'WATDO_CONFIG' , path ( '~/.watdo/config' ) ) #NEWLINE# parser = SafeConfigParser ( ) #NEWLINE# parser . add_section ( 'watdo' ) #NEWLINE# if ( not os . path . exists ( fname ) ) : #NEWLINE# #INDENT# raise CliError ( "Config file {} doesn't exist. Please create it or use the WATDO_CONFIG environment variable to point watdo to a different location." . format ( fname ) ) #NEWLINE# #UNINDENT# parser . read ( fname ) #NEWLINE# return dict ( parser . items ( 'watdo' ) )