Skip to content

Commit 012d144

Browse files
stewegsamuel-gauthier
authored andcommitted
context: fix of get_module_data
This patch fixes broken test related to get_module_data function. Closes: #103 Signed-off-by: Stefan Gula <[email protected]>
1 parent 4831b70 commit 012d144

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

libyang/context.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,11 @@ def get_module_data(
133133
Tuple of format string and YANG (sub)module schema
134134
"""
135135
if self._module_data_clb is None:
136-
return "", None
137-
fmt_str, module_data = self._module_data_clb(
138-
mod_name, mod_rev, submod_name, submod_rev
139-
)
140-
if module_data is None:
141-
return fmt_str, None
136+
return None
137+
ret = self._module_data_clb(mod_name, mod_rev, submod_name, submod_rev)
138+
if ret is None:
139+
return None
140+
fmt_str, module_data = ret
142141
module_data_c = str2c(module_data)
143142
self._cdata_modules.append(module_data_c)
144143
return fmt_str, module_data_c

0 commit comments

Comments
 (0)