Skip to content

Commit

Permalink
sambacc: fix constructing interface list for ctdb public_addresses
Browse files Browse the repository at this point in the history
The samba wiki and documentation clearly state that the list of
interfaces should be comma separated but I incorrectly joined them with
spaces. Fix this and one other small suboptimal line in the same
function.

Signed-off-by: John Mulligan <[email protected]>
  • Loading branch information
phlogistonjohn authored and mergify[bot] committed Aug 28, 2024
1 parent 02b6b18 commit 540fcf0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sambacc/ctdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@ def _write_public_addresses_file(
fh: typing.IO, addrs: list[PublicAddrAssignment]
) -> None:
for entry in addrs:
fh.write(f"{entry['address']}")
fh.write(entry["address"])
if entry["interfaces"]:
ifaces = " ".join(entry["interfaces"])
ifaces = ",".join(entry["interfaces"])
fh.write(f" {ifaces}")
fh.write("\n")

Expand Down

0 comments on commit 540fcf0

Please sign in to comment.