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

@@ -42,5 +42,5 @@ def remove_object(path: Path, name: str) -> list[Path]:
msg = f"{name} not found in {path}"
raise ClanError(msg) from e
if not os.listdir(path):
os.rmdir(path)
path.rmdir()
return paths_to_commit