From cdad1efdcf7a6b17202a94f0e5d97899703f99b9 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 20 Sep 2021 21:36:24 +1000 Subject: [PATCH] Revert "Merge pull request #1364 from evandroforks/fix_unclosed_python_file" This reverts commit c05475a49e54ed7a56bc635e5e5528334d4ba6ac. Revert "possible fix for reported audio issues" This reverts commit f00f7f099f999b8238abade5420eaef5be94e386. Reverting in case https://forums.ankiweb.net/t/2-1-48-release-candidate/13268/10 is related to this change. If the issue persists, we'll know this was not the cause. --- qt/aqt/sound.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/qt/aqt/sound.py b/qt/aqt/sound.py index 9b287b667..590776226 100644 --- a/qt/aqt/sound.py +++ b/qt/aqt/sound.py @@ -313,11 +313,6 @@ class SimpleProcessPlayer(Player): # pylint: disable=abstract-method if self._terminate_flag: self._process.terminate() self._process.wait(1) - try: - if self._process.stdin: - self._process.stdin.close() - except Exception as e: - print("unable to close stdin:", e) self._process = None return @@ -326,11 +321,6 @@ class SimpleProcessPlayer(Player): # pylint: disable=abstract-method self._process.wait(0.1) if self._process.returncode != 0: print(f"player got return code: {self._process.returncode}") - try: - if self._process.stdin: - self._process.stdin.close() - except Exception as e: - print("unable to close stdin:", e) self._process = None return except subprocess.TimeoutExpired: