From d4a336534319f16fb1edfe62a5eaef158701c612 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Thu, 19 Aug 2021 22:45:33 +0200 Subject: [PATCH] fix restricted async python3 contextmanager syntax --- grzegorz/mpv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grzegorz/mpv.py b/grzegorz/mpv.py index 442d7d8..318cbd4 100644 --- a/grzegorz/mpv.py +++ b/grzegorz/mpv.py @@ -87,7 +87,7 @@ class MPVControl: pass async def send_request(self, msg): - with await self.request_lock: + async with self.request_lock: # Note: If asyncio.Lock is FIFO, the put can be moved out of the # critical section. If await is FIFO, the lock is unnessesary. This # is the safest option.