def unset_value(self, key):<EOL>
self._ensure_have_load_only()<EOL>if key not in self._config[self.load_only]:<EOL><INDENT>raise ConfigurationError("<STR_LIT>".format(key))<EOL><DEDENT>fname, parser = self._get_parser_to_modify()<EOL>if parser is not None:<EOL><INDENT>section, name = _disassemble_key(key)<EOL>modified_something = False<EOL>if parser.has_section(section):<EOL><INDENT>modified_something = parser.remove_option(section, name)<EOL><DEDENT>if modified_something:<EOL><INDENT>section_iter = iter(parser.items(section))<EOL>try:<EOL><INDENT>val = six.next(section_iter)<EOL><DEDENT>except StopIteration:<EOL><INDENT>val = None<EOL><DEDENT>if val is None:<EOL><INDENT>parser.remove_section(section)<EOL><DEDENT>self._mark_as_modified(fname, parser)<EOL><DEDENT>else:<EOL><INDENT>raise ConfigurationError(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT><DEDENT>del self._config[self.load_only][key]<EOL>
Unset a value in the configuration.