From b9d42af42322aed1b797b4d11013fcce89b77416 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 19 Aug 2021 10:33:56 +1000 Subject: [PATCH] add a small .wait() after terminating player process Avoids python3.8/subprocess.py:942: ResourceWarning: subprocess 90387 is still running _warn("subprocess %s is still running" % self.pid, --- qt/aqt/sound.py | 1 + 1 file changed, 1 insertion(+) diff --git a/qt/aqt/sound.py b/qt/aqt/sound.py index fdf891328..590776226 100644 --- a/qt/aqt/sound.py +++ b/qt/aqt/sound.py @@ -312,6 +312,7 @@ class SimpleProcessPlayer(Player): # pylint: disable=abstract-method # should we abort playing? if self._terminate_flag: self._process.terminate() + self._process.wait(1) self._process = None return