schema: check parsed object before use by jeremie6wind · Pull Request #167 · CESNET/libyang-python
With libyang/sysrepo 4 and printed contexts, the parsed object can be null.
Check the parsed object before using it.
If the parsed object is missing:
- Module methods won't yield anything.
- ExtensionParsed _module_from_parsed raises an exception.
- SNode if_features won't yield anything.
- Create a Type object without the parsed type.
- The Container presence returns None.
- For list and leaflist order, return the info from the compiled object.
Fixes: 0a4b09f ("cffi: allows to usage of libyang v4")