Skip to content

Commit

Permalink
Use error.Position in search_module
Browse files Browse the repository at this point in the history
  • Loading branch information
remingtonc committed Nov 25, 2019
1 parent d4bef07 commit d173ab8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/pyang
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ Validates the YANG module in <filename> (or stdin), and all its dependencies."""
if o.hello:
ctx.capabilities = hel.registered_capabilities()
for (mn,rev) in hel.yang_modules():
mod = ctx.search_module(0, mn, rev)
mod = ctx.search_module(error.Position(''), mn, rev)
if mod is None:
emarg = mn
if rev: emarg += "@" + rev
Expand All @@ -306,7 +306,7 @@ Validates the YANG module in <filename> (or stdin), and all its dependencies."""
modules.append(mod)
elif o.schema_from_path:
for module_name in ctx.revs.keys():
module = ctx.search_module(0, module_name)
module = ctx.search_module(error.Position(''), module_name)
if module is None:
sys.stderr.write(
"module '%s' failed to load in schema parsing.\n" % module_name)
Expand Down

0 comments on commit d173ab8

Please sign in to comment.