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>
self.lines.append(line)
- self.lines.append(pim_vrfs)
+ if len(pim_vrfs) > 0:
+ self.lines.append(pim_vrfs)
self.load_contexts()