brevity
This commit is contained in:
parent
09b7d59b39
commit
bf92eadf3f
2 changed files with 6 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
||||||
"""
|
"""
|
||||||
Package `ovdashboard_api`: Contains the API powering the
|
Package `ovdashboard_api`: Contains the API powering the
|
||||||
"OVDashboard" application.
|
"OVDashboard" application.
|
||||||
|
|
||||||
This file: Sets up logging.
|
This file: Sets up logging.
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue