def on_modified(self, event):
if os.path.isdir(event.src_path):<EOL><INDENT>return<EOL><DEDENT>logger.debug("<STR_LIT>", event.src_path)<EOL>name = self.file_name(event)<EOL>try:<EOL><INDENT>config = yaml.load(open(event.src_path))<EOL>self.target_class.from_config(name, config)<EOL><DEDENT>except Exception:<EOL><INDENT>logger.exception(<EOL>"<STR_LIT>", event.src_path,<EOL>)<EOL>return<EOL><DEDENT>self.on_update(self.target_class, name, config)<EOL>
Modified config file handler.

If a config file is modified, the yaml contents are parsed and the
new results are validated by the target class.  Once validated, the
new config is passed to the on_update callback.