def read_config_file():
	global USERNAME, TOKEN
	config_parser = configparser.ConfigParser()
	config_filename = get_config_filename()
	try:
		with open(config_filename, 'r') as f:
			config_parser.readfp(f)
	except configparser.Error as e:
		utils.die("""The following error was encountered while attempting to parse the configuration file.
%s
This may indicate a mal-formed configuration file.
Recreate the file by invoking
cligh configure
""" % str(e))
	except __HOLE__ as e:
		utils.die("""The following error occurred while trying to open the configuration file.
%s.
If you have not already done so, create the configuration file using
cligh configure
at your shell prompt.
""" % str(e))

	try:
		USERNAME = config_parser.get('credentials', 'username')
		TOKEN = config_parser.get('credentials', 'token')
	except configparser.Error as e:
		utils.die("""The config file is missing one or more expected options.
You should probably recreate it using these two commands:
rm %s
cligh configure
""" % config_filename)
dataset/ETHPy150Open CMB/cligh/cligh/config.py/read_config_file