mirror of
https://github.com/chatmail/relay.git
synced 2026-05-20 12:58:04 +00:00
apply suggestion about pathlib
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
Chat Mail pyinfra deploy.
|
Chat Mail pyinfra deploy.
|
||||||
"""
|
"""
|
||||||
import importlib.resources
|
import importlib.resources
|
||||||
import os.path
|
from pathlib import Path
|
||||||
|
|
||||||
from pyinfra import host, logger
|
from pyinfra import host, logger
|
||||||
from pyinfra.operations import apt, files, server, systemd, python
|
from pyinfra.operations import apt, files, server, systemd, python
|
||||||
@@ -17,7 +17,7 @@ def _install_doveauth() -> None:
|
|||||||
f"../../../doveauth/dist/{doveauth_filename}"
|
f"../../../doveauth/dist/{doveauth_filename}"
|
||||||
)
|
)
|
||||||
remote_path = f"/tmp/{doveauth_filename}"
|
remote_path = f"/tmp/{doveauth_filename}"
|
||||||
if os.path.exists(str(doveauth_path)):
|
if Path(str(doveauth_path)).exists():
|
||||||
files.put(
|
files.put(
|
||||||
name="upload local doveauth build",
|
name="upload local doveauth build",
|
||||||
src=doveauth_path.open("rb"),
|
src=doveauth_path.open("rb"),
|
||||||
|
|||||||
Reference in New Issue
Block a user