def read(self, config_dir=None, clear=False, config_file=None):
if config_file:<EOL><INDENT>data_file = os.path.basename(config_file)<EOL>data_path = os.path.dirname(config_file)<EOL>if clear:<EOL><INDENT>self.clear()<EOL><DEDENT>config = munge.load_datafile(data_file, data_path, default=None)<EOL>if not config:<EOL><INDENT>raise IOError("<STR_LIT>" % config_file)<EOL><DEDENT>munge.util.recursive_update(self.data, config)<EOL>self._meta_config_dir = data_path<EOL>return<EOL><DEDENT>else:<EOL><INDENT>return super(Config, self).read(config_dir=config_dir, clear=clear)<EOL><DEDENT>
The munge Config's read function only allows to read from
a config directory, but we also want to be able to read
straight from a config file as well