Commit edef470
data: fix error when key is prefixed
Fix the following error
```
======================================================================
ERROR: test_data_from_dict_module_with_prefix (test_data.DataTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/data/sm/libyang-python/tests/test_data.py", line 298, in test_data_from_dict_module_with_prefix
dnode = module.parse_data_dict(
File "/data/sm/libyang-python/.tox/py3-devel/lib/python3.8/site-packages/libyang/schema.py", line 177, in parse_data_dict
return dict_to_dnode(
File "/data/sm/libyang-python/.tox/py3-devel/lib/python3.8/site-packages/libyang/data.py", line 806, in dict_to_dnode
_to_dnode(
File "/data/sm/libyang-python/.tox/py3-devel/lib/python3.8/site-packages/libyang/data.py", line 743, in _to_dnode
prefix, name = name.split(":")
UnboundLocalError: local variable 'name' referenced before assignment
```
Signed-off-by: Wataru Ishida <wataru.ishid@gmail.com>1 parent 8135b78 commit edef470
2 files changed
+36
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
740 | 740 | | |
741 | 741 | | |
742 | 742 | | |
743 | | - | |
| 743 | + | |
744 | 744 | | |
745 | 745 | | |
746 | 746 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
273 | 308 | | |
274 | 309 | | |
275 | 310 | | |
| |||
0 commit comments