Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cffi/cdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ typedef enum {
LY_ERR ly_ctx_new(const char *, uint16_t, struct ly_ctx **);
void ly_ctx_destroy(struct ly_ctx *);
int ly_ctx_set_searchdir(struct ly_ctx *, const char *);
const char *ly_yang_module_dir(void);

typedef enum
{
Expand Down
5 changes: 5 additions & 0 deletions libyang/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@ def __init__(
search_paths.extend(search_path.strip(": \t\r\n'\"").split(":"))

search_paths = [path for path in search_paths if os.path.isdir(path)]

module_dir = c2str(lib.ly_yang_module_dir())
if module_dir:
search_paths.insert(0, module_dir)

search_path = ":".join(search_paths) if search_paths else None

if yanglib_path is None:
Expand Down
Loading