]> git.puffer.fish Git - matthieu/frr.git/commit
tools: Do not append an empty list (pim_vrfs) to the config lines
authorDonatas Abraitis <donatas@opensourcerouting.org>
Sat, 20 Jul 2024 00:29:21 +0000 (03:29 +0300)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Sat, 20 Jul 2024 00:29:21 +0000 (03:29 +0300)
commitd022a4099c5476b78b2215fcc2f1c06559ceaf09
treeaf86684b285d1cd15987cc487a7e56fb09d2b22b
parent7aeb51e1944efcc643a513cd08ca0ec1c12d83d9
tools: Do not append an empty list (pim_vrfs) to the config lines

If pim_vrfs is empty, we append [] into the lines array, and the reload is broken
since it expects only strings, but gets an array inside at the end.

```
Traceback (most recent call last):
  File "/usr/lib/frr/frr-reload.py", line 2227, in <module>
    log.debug("New Frr Config\n%s", newconf.get_lines())
  File "/usr/lib/frr/frr-reload.py", line 436, in get_lines
    return "\n".join(self.lines)
TypeError: sequence item 45: expected str instance, list found
```

Fixes: 98d47f43fbba4e376c8351c724e8c625799805f7 ("tools: Fix frr-reload to support legacy pim configuration from file")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
tools/frr-reload.py