pyang
pyang copied to clipboard
Problem with emit_depend if revision-date is specified for the import
Hello,
YANG Catalog is suffering from a problem with the depend.py plugin. If revision-date is defined for include/import, this revision is not considered in add_prereqs() method.
import ietf-te {
prefix "te";
revision-date "2021-02-20";
}
If revision specified by revision-date is not the latest revision of the module - None is returned from get_module() method https://github.com/mbj4668/pyang/blob/de7a4be61fa699929a31a404e1b696c57737fa5f/pyang/plugins/depend.py#L105 Finally, this results in exception in next add_prereqs() method call (since depend_recurse is set to True) on following line: https://github.com/mbj4668/pyang/blob/de7a4be61fa699929a31a404e1b696c57737fa5f/pyang/plugins/depend.py#L92 Exception:
'NoneType' object has no attribute 'search'"
Regards, Slavomir Mazur