Chore: Switch from os.path to pathlib.Path (#8644)

This commit is contained in:
Sebastian Steinbeißer
2025-01-29 19:58:53 +01:00
committed by GitHub
parent 79956d6a7b
commit fce7b03324
5 changed files with 72 additions and 137 deletions

View File

@@ -353,7 +353,7 @@ def cleanup_document_deletion(sender, instance, **kwargs):
f"{filename} could not be deleted: {e}",
)
elif filename and not os.path.isfile(filename):
logger.warn(f"Expected {filename} tp exist, but it did not")
logger.warning(f"Expected {filename} to exist, but it did not")
delete_empty_directories(
os.path.dirname(instance.source_path),