Skip to content

Commit 2cdb2f6

Browse files
committed
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>
1 parent 4831b70 commit 2cdb2f6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

libyang/context.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,12 @@ def get_module_data(
134134
"""
135135
if self._module_data_clb is None:
136136
return "", None
137-
fmt_str, module_data = self._module_data_clb(
137+
ret = self._module_data_clb(
138138
mod_name, mod_rev, submod_name, submod_rev
139139
)
140-
if module_data is None:
141-
return fmt_str, None
140+
if ret is None:
141+
return None
142+
fmt_str, module_data = ret
142143
module_data_c = str2c(module_data)
143144
self._cdata_modules.append(module_data_c)
144145
return fmt_str, module_data_c

0 commit comments

Comments
 (0)