mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Make sure all args are strings
This commit is contained in:
@@ -111,7 +111,7 @@ class SpamassassinClient:
|
|||||||
self._learn_cmd_kwargs = {}
|
self._learn_cmd_kwargs = {}
|
||||||
self._expected_exit_codes = [5, 6]
|
self._expected_exit_codes = [5, 6]
|
||||||
|
|
||||||
def _find_binary(self, name):
|
def _find_binary(self, name: str) -> str:
|
||||||
"""Find path to binary."""
|
"""Find path to binary."""
|
||||||
code, output = exec_cmd(f"which {name}", shell=True)
|
code, output = exec_cmd(f"which {name}", shell=True)
|
||||||
if not code:
|
if not code:
|
||||||
@@ -134,7 +134,7 @@ class SpamassassinClient:
|
|||||||
"-d",
|
"-d",
|
||||||
self.conf["spamd_address"],
|
self.conf["spamd_address"],
|
||||||
"-p",
|
"-p",
|
||||||
self.conf["spamd_port"],
|
str(self.conf["spamd_port"]),
|
||||||
"-L",
|
"-L",
|
||||||
mtype,
|
mtype,
|
||||||
"-u",
|
"-u",
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ class ScheduledMessage(models.Model):
|
|||||||
constants.MAILBOX_NAME_SCHEDULED,
|
constants.MAILBOX_NAME_SCHEDULED,
|
||||||
"header",
|
"header",
|
||||||
constants.CUSTOM_HEADER_SCHEDULED_ID,
|
constants.CUSTOM_HEADER_SCHEDULED_ID,
|
||||||
self.id,
|
str(self.id),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
if code:
|
if code:
|
||||||
|
|||||||
Reference in New Issue
Block a user