@staticmethod<EOL><INDENT>def _check_yaml_and_paths(ymlfilepath, yamldefs):<DEDENT>
relpath = os.path.relpath(ymlfilepath)<EOL>if '<STR_LIT:/>' not in relpath:<EOL><INDENT>relpath = '<STR_LIT>' % relpath<EOL><DEDENT>pathroot = os.path.abspath(os.path.dirname(ymlfilepath))<EOL>for imagename, defn in iteritems(yamldefs):<EOL><INDENT>if imagename == '<STR_LIT>':<EOL><INDENT>yamldefs['<STR_LIT>'] = [os.path.relpath(_get_abspath(pathroot, p))<EOL>for p in yamldefs['<STR_LIT>']]<EOL>continue<EOL><DEDENT>elif imagename in SPECIAL_FIELDS:<EOL><INDENT>continue<EOL><DEDENT>for key in ('<STR_LIT>', '<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>if key in defn:<EOL><INDENT>defn[key] = _get_abspath(pathroot, defn[key])<EOL><DEDENT><DEDENT>if '<STR_LIT>' in defn:<EOL><INDENT>if not isinstance(defn['<STR_LIT>'], dict):<EOL><INDENT>raise errors.ParsingFailure((<EOL>'<STR_LIT>' +<EOL>'<STR_LIT>' <EOL>'<STR_LIT>') % (ymlfilepath, imagename))<EOL><DEDENT>for otherimg, value in defn.get('<STR_LIT>', {}).items():<EOL><INDENT>if not isinstance(value, dict):<EOL><INDENT>raise errors.ParsingFailure((<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>')%<EOL>(imagename, otherimg, ymlfilepath))<EOL><DEDENT><DEDENT><DEDENT>defn['<STR_LIT>'] = relpath<EOL>if '<STR_LIT:ignore>' in defn and '<STR_LIT>' in defn:<EOL><INDENT>raise errors.MultipleIgnoreError(<EOL>'<STR_LIT>' % imagename +<EOL>'<STR_LIT>')<EOL><DEDENT>if '<STR_LIT>' in defn and not defn.get('<STR_LIT>', True):<EOL><INDENT>raise errors.ParsingFailure(<EOL>"<STR_LIT>"<EOL>% imagename)<EOL><DEDENT>if defn.get('<STR_LIT>', None) and defn.get('<STR_LIT>', False):<EOL><INDENT>raise errors.ParsingFailure(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>' % imagename)<EOL><DEDENT>for key in defn:<EOL><INDENT>if key not in RECOGNIZED_KEYS:<EOL><INDENT>raise errors.UnrecognizedKeyError(<EOL>'<STR_LIT>' %<EOL>(key, imagename, relpath))<EOL><DEDENT><DEDENT><DEDENT>
Checks YAML for errors and resolves all paths