Repository navigation
Commit d2363c9
committed
context: fix creation failure without libyang module dir
Since libyang commit be5a07fea89d ("context UPDATE remove binary
internal modules"), ly_ctx_new() reads its internal modules from the
search dirs. So creating a context fails when ly_yang_module_dir() is
not one of them:
>>> libyang.Context()
libyang.util.LibyangError: cannot create context
Always add this dir at the end of the search path. User dirs are still
searched first, and libyang ignores a dir that is given twice.
ly_yang_module_dir() was added by the same libyang commit, and the
first release with it is v5.8.6, with soversion 5.5.5. So require this
version.
Closes: #172
Closes: #173
Suggested-by: Pepa Hajek <hajekpepa@gmail.com>
Signed-off-by: Samuel Gauthier <samuel.gauthier@6wind.com>1 parent 72c3915 commit d2363c9
3 files changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| 250 | + | |
| 251 | + | |
250 | 252 | | |
251 | 253 | | |
252 | 254 | | |
| |||
0 commit comments