mbj4668 / pyang

An extensible YANG validator and converter in python
ISC License
528 stars 342 forks source link

Deviation problem for config statement in list - craters PYANG (2.5.3) #886

Closed tcareyintx closed 3 months ago

tcareyintx commented 5 months ago

When deviating a list's config statement from false to true; pyang (PYANG version 2.5.3) craters with the following stack trace: Traceback (most recent call last): File "/home/tcarey/.local/bin/pyang", line 580, in run() File "/home/tcarey/.local/bin/pyang", line 433, in run ctx_validate_and_prune() File "/home/tcarey/.local/bin/pyang", line 429, in ctx_validate_and_prune ctx.validate() File "/home/tcarey/.local/lib/python3.10/site-packages/pyang/context.py", line 348, in validate statements.validate_module(self, m) File "/home/tcarey/.local/lib/python3.10/site-packages/pyang/statements.py", line 414, in validate_module iterate(module, phase) File "/home/tcarey/.local/lib/python3.10/site-packages/pyang/statements.py", line 409, in iterate iterate(s, phase) File "/home/tcarey/.local/lib/python3.10/site-packages/pyang/statements.py", line 371, in iterate res = f(ctx, stmt) File "/home/tcarey/.local/lib/python3.10/site-packages/pyang/statements.py", line 243, in ('reference_4', 'deviation'):lambda ctx, s:v_reference_deviation_4(ctx, s), File "/home/tcarey/.local/lib/python3.10/site-packages/pyang/statements.py", line 2391, in v_reference_deviation_4 v_recheck_target(ctx, stmt.i_target_node, reference=True) File "/home/tcarey/.local/lib/python3.10/site-packages/pyang/statements.py", line 2412, in v_recheck_target v_reference_list(ctx, t) File "/home/tcarey/.local/lib/python3.10/site-packages/pyang/statements.py", line 2110, in v_reference_list v_key() File "/home/tcarey/.local/lib/python3.10/site-packages/pyang/statements.py", line 2034, in v_key err_add(ctx.errors, ptr.search_one('config').pos, AttributeError: 'NoneType' object has no attribute 'pos' list-deviation-problem.zip