use pathlib everywhere

This commit is contained in:
Jörg Thalheim
2024-09-02 18:25:17 +02:00
parent 0de5dea92a
commit 659e5b37dd
28 changed files with 88 additions and 113 deletions

View File

@@ -1,4 +1,3 @@
import os
import shutil
from pathlib import Path
@@ -30,6 +29,6 @@ class SecretStore(SecretStoreBase):
return (self.dir / service / name).exists()
def upload(self, output_dir: Path) -> None:
if os.path.exists(output_dir):
if output_dir.exists():
shutil.rmtree(output_dir)
shutil.copytree(self.dir, output_dir)