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