diff options
author | Maxim Devaev <[email protected]> | 2023-03-06 19:21:16 +0200 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2023-03-06 19:21:16 +0200 |
commit | 3c29e8f61a3a8ca1e7309436ac5130c287caeda9 (patch) | |
tree | 338e51de568d2fd8506c82ec89bf2cfb401466d4 /kvmd | |
parent | cd3c28e97f9a5159148efa90d8e07c55edc86aae (diff) |
create path on msd image uploading
Diffstat (limited to 'kvmd')
-rw-r--r-- | kvmd/plugins/msd/__init__.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kvmd/plugins/msd/__init__.py b/kvmd/plugins/msd/__init__.py index ffe4cf76..e0fc856e 100644 --- a/kvmd/plugins/msd/__init__.py +++ b/kvmd/plugins/msd/__init__.py @@ -269,6 +269,7 @@ class MsdFileWriter(BaseMsdWriter): # pylint: disable=too-many-instance-attribu async def open(self) -> "MsdFileWriter": assert self.__file is None get_logger(1).info("Writing %r image (%d bytes) to MSD ...", self.__name, self.__file_size) + os.makedirs(os.path.dirname(self.__path), exist_ok=True) self.__file = await aiofiles.open(self.__path, mode="w+b", buffering=0) # type: ignore return self |