def load(self, reload=False, require_load=False):<EOL>
if reload:  <EOL><INDENT>self.config = None<EOL><DEDENT>if self.config:  <EOL><INDENT>self._log.debug('<STR_LIT>'<EOL>'<STR_LIT>')<EOL>return<EOL><DEDENT>path = self._effective_path()<EOL>config_filename = self._effective_filename()<EOL>self._active_path = [join(_, config_filename) for _ in path]<EOL>for dirname in path:<EOL><INDENT>conf_name = join(dirname, config_filename)<EOL>readable = self.check_file(conf_name)<EOL>if readable:<EOL><INDENT>action = '<STR_LIT>' if self._loaded_files else '<STR_LIT>'<EOL>self._log.info('<STR_LIT>', action, conf_name)<EOL>self.read(conf_name)<EOL>if conf_name == expanduser("<STR_LIT>" % (<EOL>self.group_name, self.app_name, self.filename)):<EOL><INDENT>self._log.warning(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>", expanduser("<STR_LIT>"), self.group_name,<EOL>self.app_name, expanduser("<STR_LIT>"), self.group_name,<EOL>self.app_name)<EOL><DEDENT>self._loaded_files.append(conf_name)<EOL><DEDENT><DEDENT>if not self._loaded_files and not require_load:<EOL><INDENT>self._log.warning(<EOL>"<STR_LIT>",<EOL>config_filename,<EOL>path)<EOL><DEDENT>elif not self._loaded_files and require_load:<EOL><INDENT>raise IOError("<STR_LIT>"<EOL>"<STR_LIT>" % (config_filename, path))<EOL><DEDENT>
Searches for an appropriate config file. If found, loads the file into
the current instance. This method can also be used to reload a
configuration. Note that you may want to set ``reload`` to ``True`` to
clear the configuration before loading in that case.  Without doing
that, values will remain available even if they have been removed from
the config files.

:param reload: if set to ``True``, the existing values are cleared
               before reloading.
:param require_load: If set to ``True`` this will raise a
                     :py:exc:`IOError` if no config file has been found
                     to load.