mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 05:18:47 +00:00
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: 98d47f43fb
("tools: Fix frr-reload to support legacy pim configuration from file")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
7aeb51e194
commit
d022a4099c
@ -400,6 +400,7 @@ class Config(object):
|
||||
|
||||
self.lines.append(line)
|
||||
|
||||
if len(pim_vrfs) > 0:
|
||||
self.lines.append(pim_vrfs)
|
||||
|
||||
self.load_contexts()
|
||||
|
Loading…
Reference in New Issue
Block a user