From ec9785b4be4afb8667e6968a0454aeca62a190e2 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Sun, 7 Aug 2022 19:04:32 +0300 Subject: simplified AioNotifier() --- kvmd/plugins/msd/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kvmd/plugins/msd/__init__.py') diff --git a/kvmd/plugins/msd/__init__.py b/kvmd/plugins/msd/__init__.py index 753a1cd0..1e4a521e 100644 --- a/kvmd/plugins/msd/__init__.py +++ b/kvmd/plugins/msd/__init__.py @@ -218,7 +218,7 @@ class MsdFileReader(BaseMsdReader): # pylint: disable=too-many-instance-attribu now = time.monotonic() if self.__tick + 1 < now or self.__readed == self.__file_size: self.__tick = now - await self.__notifier.notify() + self.__notifier.notify() yield chunk @@ -277,7 +277,7 @@ class MsdFileWriter(BaseMsdWriter): # pylint: disable=too-many-instance-attribu now = time.monotonic() if self.__tick + 1 < now: self.__tick = now - await self.__notifier.notify() + self.__notifier.notify() return self.__written -- cgit v1.2.3