def _read_configuration_file(self, path):
parser = RawConfigParser(inline_comment_prefixes=('<STR_LIT:#>', '<STR_LIT:;>'))<EOL>options = None<EOL>should_inherit = True<EOL>if parser.read(path) and self._get_section_name(parser):<EOL><INDENT>all_options = self._parser.option_list[:]<EOL>for group in self._parser.option_groups:<EOL><INDENT>all_options.extend(group.option_list)<EOL><DEDENT>option_list = {o.dest: o.type or o.action<EOL>for o in all_options}<EOL>new_options, _ = self._parse_args([])<EOL>section_name = self._get_section_name(parser)<EOL>for opt in parser.options(section_name):<EOL><INDENT>if opt == '<STR_LIT>':<EOL><INDENT>should_inherit = parser.getboolean(section_name, opt)<EOL>continue<EOL><DEDENT>if opt.replace('<STR_LIT:_>', '<STR_LIT:->') not in self.CONFIG_FILE_OPTIONS:<EOL><INDENT>log.warning("<STR_LIT>".format(opt))<EOL>continue<EOL><DEDENT>normalized_opt = opt.replace('<STR_LIT:->', '<STR_LIT:_>')<EOL>opt_type = option_list[normalized_opt]<EOL>if opt_type in ('<STR_LIT:int>', '<STR_LIT:count>'):<EOL><INDENT>value = parser.getint(section_name, opt)<EOL><DEDENT>elif opt_type == '<STR_LIT:string>':<EOL><INDENT>value = parser.get(section_name, opt)<EOL><DEDENT>else:<EOL><INDENT>assert opt_type in ('<STR_LIT:store_true>', '<STR_LIT>')<EOL>value = parser.getboolean(section_name, opt)<EOL><DEDENT>setattr(new_options, normalized_opt, value)<EOL><DEDENT>options = self._fix_set_options(new_options)<EOL><DEDENT>if options is not None:<EOL><INDENT>if not self._validate_options(options):<EOL><INDENT>raise IllegalConfiguration('<STR_LIT>'.format(path))<EOL><DEDENT><DEDENT>return options, should_inherit<EOL>
Try to read and parse `path` as a configuration file.

        If the configurations were illegal (checked with
        `self._validate_options`), raises `IllegalConfiguration`.

        Returns (options, should_inherit).