Skip to content

Commit

Permalink
context: fix of get_module_data
Browse files Browse the repository at this point in the history
This patch fixes broken test related to get_module_data function.

Closes: #103
Signed-off-by: Stefan Gula <[email protected]>
  • Loading branch information
steweg authored and samuel-gauthier committed Aug 5, 2024
1 parent 4831b70 commit 012d144
Showing 1 changed file with 5 additions and 6 deletions.
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

0 comments on commit 012d144

Please sign in to comment.