Compare commits

..

No commits in common. "19c6772b8851e7d8e10ee8eec4e06100681a097f" and "2b17aa5b8fb45a3b764f8fa2ab24315a3824f4c5" have entirely different histories.

3 changed files with 10 additions and 10 deletions

View file

@ -50,7 +50,7 @@ class WebDAVSettings(DAVSettings):
username: str = "ovd_user"
password: str = "password"
config_filename: str = "config.toml"
config_filename: str = "config.txt"
disable_check: bool = False
retries: int = 20

View file

@ -35,7 +35,7 @@ class WebDAV:
regex: re.Pattern[str] = re.compile(""),
) -> list[str]:
"""
List files in directory `directory` matching RegEx `regex`
Liste aller Dateien im Ordner `directory`, die zur RegEx `regex` passen
"""
_logger.debug(f"list_files {directory!r}")
@ -49,9 +49,9 @@ class WebDAV:
maxsize=SETTINGS.webdav.cache_size,
skip_args=1,
)
async def exists(cls, path: str) -> bool:
async def file_exists(cls, path: str) -> bool:
"""
`True` iff there is a WebDAV resource at `path`
`True`, wenn an Pfad `path` eine Datei existiert
"""
_logger.debug(f"file_exists {path!r}")
@ -67,7 +67,7 @@ class WebDAV:
)
async def read_bytes(cls, path: str) -> bytes:
"""
Load WebDAV file from `path` as bytes
Datei aus Pfad `path` als bytes laden
"""
_logger.debug(f"read_bytes {path!r}")
@ -79,7 +79,7 @@ class WebDAV:
@classmethod
async def read_str(cls, path: str, encoding="utf-8") -> str:
"""
Load WebDAV file from `path` as string
Datei aus Pfad `path` als string laden
"""
_logger.debug(f"read_str {path!r}")
@ -88,7 +88,7 @@ class WebDAV:
@classmethod
async def write_bytes(cls, path: str, buffer: bytes) -> None:
"""
Write bytes from `buffer` into WebDAV file at `path`
Bytes `buffer` in Datei in Pfad `path` schreiben
"""
_logger.debug(f"write_bytes {path!r}")
@ -106,7 +106,7 @@ class WebDAV:
@classmethod
async def write_str(cls, path: str, content: str, encoding="utf-8") -> None:
"""
Write string from `content` into WebDAV file at `path`
String `content` in Datei in Pfad `path` schreiben
"""
_logger.debug(f"write_str {path!r}")

View file

@ -62,9 +62,9 @@ class FileNameLister:
async def __call__(self) -> Iterator[str]:
try:
file_names = await WebDAV.list_files(await self.remote_path, regex=self.re)
file_names = await WebDAV.list_files(await self.remote_path)
return iter(file_names)
return (name for name in file_names if self.re.search(name))
except RemoteResourceNotFound:
_logger.error(