Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
context: fix of get_module_data
This patch fixes broken test related to get_module_data
function

Signed-off-by: Stefan Gula <steweg@gmail.com>
  • Loading branch information
steweg committed Aug 5, 2024
commit ca1848db370c0a927ca9c67a55d329d245e77970
11 changes: 5 additions & 6 deletions libyang/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,11 @@ def get_module_data(
Tuple of format string and YANG (sub)module schema
"""
if self._module_data_clb is None:
return "", None
fmt_str, module_data = self._module_data_clb(
mod_name, mod_rev, submod_name, submod_rev
)
if module_data is None:
return fmt_str, None
return None
ret = self._module_data_clb(mod_name, mod_rev, submod_name, submod_rev)
if ret is None:
return None
fmt_str, module_data = ret
module_data_c = str2c(module_data)
self._cdata_modules.append(module_data_c)
return fmt_str, module_data_c
Expand Down
Loading