mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-29 15:51:32 +00:00
tools: frr-reload fix list value not present
Check for value present in list before removing as in certain python3 ValueError traceback is observed. Traceback (most recent call last): File "/usr/lib/frr/frr-reload.py", line 2278, in <module> (lines_to_add, lines_to_del, restart_frr) = compare_context_objects(newconf, running) File "/usr/lib/frr/frr-reload.py", line 1933, in compare_context_objects lines_to_add, lines_to_del File "/usr/lib/frr/frr-reload.py", line 1549, in ignore_delete_re_add_lines lines_to_del.remove((ctx_keys, line)) ValueError: list.remove(x): x not in list Ticket:#3389979 Issue:3389979 Testing Done: With fix perform frr-relaod on frr.conf config where earlier traceback was seen. Signed-off-by: Donald Sharp <sharpd@nvidia.com> Signed-off-by: Chirag Shah <chirag@nvidia.com>
This commit is contained in:
parent
6f5f572b9c
commit
1543f58b55
@ -1474,9 +1474,11 @@ def ignore_delete_re_add_lines(lines_to_add, lines_to_del):
|
||||
lines_to_add_to_del.append((tmp_ctx_keys, line))
|
||||
|
||||
for (ctx_keys, line) in lines_to_del_to_del:
|
||||
if line is not None:
|
||||
lines_to_del.remove((ctx_keys, line))
|
||||
|
||||
for (ctx_keys, line) in lines_to_add_to_del:
|
||||
if line is not None:
|
||||
lines_to_add.remove((ctx_keys, line))
|
||||
|
||||
return (lines_to_add, lines_to_del)
|
||||
|
Loading…
Reference in New Issue
Block a user