def get_configuration(filename):
logger.debug('<STR_LIT>'.format(filename))<EOL>conf = SafeConfigParser()<EOL>conf.read(filename)<EOL>if not conf:<EOL><INDENT>logger.error('<STR_LIT>'.format(filename))<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>if not conf.has_section('<STR_LIT>'):<EOL><INDENT>logger.error('<STR_LIT>')<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>try:<EOL><INDENT>config = {<EOL>'<STR_LIT>': conf.get('<STR_LIT>', '<STR_LIT>'),<EOL>'<STR_LIT>': conf.get('<STR_LIT>', '<STR_LIT>'),<EOL>'<STR_LIT>': conf.get('<STR_LIT>', '<STR_LIT>'),<EOL>}<EOL><DEDENT>except NoOptionError as err:<EOL><INDENT>logger.error('<STR_LIT>'.format(err))<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>return config<EOL>
Read configuration file

    :type filename: str
    :param filename: Path to the configuration file