Skip to content

Commit 3305989

Browse files
phlogistonjohnmergify[bot]
authored andcommitted
sambacc: simplify the closure function writing ctdb config
If we are going to use a closure we might as well go all the way with it. Signed-off-by: John Mulligan <[email protected]>
1 parent c496acb commit 3305989

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

sambacc/ctdb.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,21 +94,21 @@ def write_ctdb_conf(
9494
) -> None:
9595
"""Write a ctdb.conf style output."""
9696

97-
def _write_param(fh: typing.IO, name: str, key: str) -> None:
97+
def _write_param(name: str, key: str) -> None:
9898
value = ctdb_params.get(key)
9999
if value is None:
100100
return
101101
fh.write(enc(f"{name} = {value}\n"))
102102

103103
fh.write(enc("[logging]\n"))
104-
_write_param(fh, "log level", "log_level")
104+
_write_param("log level", "log_level")
105105
fh.write(enc("\n"))
106106
fh.write(enc("[cluster]\n"))
107-
_write_param(fh, "recovery lock", "recovery_lock")
107+
_write_param("recovery lock", "recovery_lock")
108108
fh.write(enc("\n"))
109109
fh.write(enc("[legacy]\n"))
110-
_write_param(fh, "realtime scheduling", "realtime_scheduling")
111-
_write_param(fh, "script log level", "script_log_level")
110+
_write_param("realtime scheduling", "realtime_scheduling")
111+
_write_param("script log level", "script_log_level")
112112
fh.write(enc("\n"))
113113

114114

0 commit comments

Comments
 (0)