From 4ebec75d952a256dd4806f66981868733072c3d9 Mon Sep 17 00:00:00 2001 From: missytake Date: Fri, 13 Oct 2023 21:08:54 +0200 Subject: [PATCH] apply suggestion about pathlib --- chatmail-pyinfra/src/chatmail/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chatmail-pyinfra/src/chatmail/__init__.py b/chatmail-pyinfra/src/chatmail/__init__.py index f2dce53d..18ac12e4 100644 --- a/chatmail-pyinfra/src/chatmail/__init__.py +++ b/chatmail-pyinfra/src/chatmail/__init__.py @@ -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"),