mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-04-07 02:53:38 +00:00
review fixes
This commit is contained in:
@@ -97,8 +97,9 @@ class ArchiveTree(LazyLogging):
|
||||
parents = [repository] + list(repository.parents[:-1])
|
||||
for parent in parents:
|
||||
path = root / parent
|
||||
if not list(path.iterdir()):
|
||||
path.rmdir()
|
||||
if list(path.iterdir()):
|
||||
continue # directory is not empty
|
||||
path.rmdir()
|
||||
|
||||
def repository_for(self, date: datetime.date | None = None) -> Path:
|
||||
"""
|
||||
|
||||
@@ -26,16 +26,12 @@ from dataclasses import dataclass, field
|
||||
from functools import cached_property
|
||||
from pathlib import Path
|
||||
from pwd import getpwuid
|
||||
from typing import ParamSpec
|
||||
|
||||
from ahriman.core.log import LazyLogging
|
||||
from ahriman.core.utils import owner
|
||||
from ahriman.models.repository_id import RepositoryId
|
||||
|
||||
|
||||
Params = ParamSpec("Params")
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class RepositoryPaths(LazyLogging):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user