Skip to content

Commit 6b7c002

Browse files
committed
use non-underscore naming for basedeploy helpers
1 parent 4b2f987 commit 6b7c002

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

cmdeploy/src/cmdeploy/basedeploy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def get_resource(arg, pkg=__package__):
99
return importlib.resources.files(pkg).joinpath(arg)
1010

1111

12-
def _configure_remote_units(mail_domain, units) -> None:
12+
def configure_remote_units(mail_domain, units) -> None:
1313
remote_base_dir = "/usr/local/lib/chatmaild"
1414
remote_venv_dir = f"{remote_base_dir}/venv"
1515
remote_chatmail_inipath = f"{remote_base_dir}/chatmail.ini"
@@ -38,7 +38,7 @@ def _configure_remote_units(mail_domain, units) -> None:
3838
)
3939

4040

41-
def _activate_remote_units(units) -> None:
41+
def activate_remote_units(units) -> None:
4242
# activate systemd units
4343
for fn in units:
4444
basename = fn if "." in fn else f"{fn}.service"

cmdeploy/src/cmdeploy/deployers.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
from .basedeploy import (
2222
Deployer,
2323
Deployment,
24-
_activate_remote_units,
25-
_configure_remote_units,
24+
activate_remote_units,
25+
configure_remote_units,
2626
get_resource,
2727
)
2828
from .dovecot.deployer import DovecotDeployer
@@ -315,10 +315,10 @@ def install(self):
315315
)
316316

317317
def configure(self):
318-
_configure_remote_units(self.mail_domain, self.units)
318+
configure_remote_units(self.mail_domain, self.units)
319319

320320
def activate(self):
321-
_activate_remote_units(self.units)
321+
activate_remote_units(self.units)
322322

323323

324324
class IrohDeployer(Deployer):
@@ -422,10 +422,10 @@ def install(self):
422422
)
423423

424424
def configure(self):
425-
_configure_remote_units(self.mail_domain, self.units)
425+
configure_remote_units(self.mail_domain, self.units)
426426

427427
def activate(self):
428-
_activate_remote_units(self.units)
428+
activate_remote_units(self.units)
429429

430430

431431
class ChatmailVenvDeployer(Deployer):
@@ -447,10 +447,10 @@ def install(self):
447447

448448
def configure(self):
449449
_configure_remote_venv_with_chatmaild(self.config)
450-
_configure_remote_units(self.config.mail_domain, self.units)
450+
configure_remote_units(self.config.mail_domain, self.units)
451451

452452
def activate(self):
453-
_activate_remote_units(self.units)
453+
activate_remote_units(self.units)
454454

455455

456456
class ChatmailDeployer(Deployer):

cmdeploy/src/cmdeploy/dovecot/deployer.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
from cmdeploy.basedeploy import (
88
Deployer,
9-
_activate_remote_units,
10-
_configure_remote_units,
9+
activate_remote_units,
10+
configure_remote_units,
1111
get_resource,
1212
)
1313

@@ -26,11 +26,11 @@ def install(self):
2626
_install_dovecot_package("lmtpd", arch)
2727

2828
def configure(self):
29-
_configure_remote_units(self.config.mail_domain, self.units)
29+
configure_remote_units(self.config.mail_domain, self.units)
3030
self.need_restart = _configure_dovecot(self.config)
3131

3232
def activate(self):
33-
_activate_remote_units(self.units)
33+
activate_remote_units(self.units)
3434

3535
restart = False if self.disable_mail else self.need_restart
3636

0 commit comments

Comments
 (0)