This commit is contained in:
Jörn-Michael Miehe 2022-09-05 12:58:00 +00:00
parent 09b7d59b39
commit bf92eadf3f
2 changed files with 6 additions and 5 deletions

View file

@ -27,14 +27,15 @@ async def _get_buffer(
""" """
@run_in_executor @run_in_executor
def _inner(resource: Resource) -> BytesIO: def _inner() -> BytesIO:
_logger.info(f"updating {resource.urn.filename()!r} ...") _logger.info(f"updating {remote_path!r} ...")
resource = webdav_resource(remote_path)
buffer = BytesIO() buffer = BytesIO()
resource.write_to(buffer) resource.write_to(buffer)
return buffer return buffer
resource = webdav_resource(remote_path) return await _inner()
return await _inner(resource)
@dataclass(frozen=True) @dataclass(frozen=True)