From bf92eadf3ff45e9d1d7157570dacb418be459e1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= <40151420+ldericher@users.noreply.github.com> Date: Mon, 5 Sep 2022 12:58:00 +0000 Subject: [PATCH] brevity --- api/ovdashboard_api/__init__.py | 2 +- api/ovdashboard_api/dav_file.py | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/api/ovdashboard_api/__init__.py b/api/ovdashboard_api/__init__.py index 36d78ee..2ad3621 100644 --- a/api/ovdashboard_api/__init__.py +++ b/api/ovdashboard_api/__init__.py @@ -1,5 +1,5 @@ """ -Package `ovdashboard_api`: Contains the API powering the +Package `ovdashboard_api`: Contains the API powering the "OVDashboard" application. This file: Sets up logging. diff --git a/api/ovdashboard_api/dav_file.py b/api/ovdashboard_api/dav_file.py index 991d9a3..7fc1e11 100644 --- a/api/ovdashboard_api/dav_file.py +++ b/api/ovdashboard_api/dav_file.py @@ -27,14 +27,15 @@ async def _get_buffer( """ @run_in_executor - def _inner(resource: Resource) -> BytesIO: - _logger.info(f"updating {resource.urn.filename()!r} ...") + def _inner() -> BytesIO: + _logger.info(f"updating {remote_path!r} ...") + + resource = webdav_resource(remote_path) buffer = BytesIO() resource.write_to(buffer) return buffer - resource = webdav_resource(remote_path) - return await _inner(resource) + return await _inner() @dataclass(frozen=True)