mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-07 02:21:54 +00:00
Ensure FFmpeg players have a _process attribute set even during errors
This commit is contained in:
parent
3802780f77
commit
54541ba6f0
@ -161,7 +161,9 @@ class FFmpegAudio(AudioSource):
|
|||||||
kwargs = {'stdout': subprocess.PIPE}
|
kwargs = {'stdout': subprocess.PIPE}
|
||||||
kwargs.update(subprocess_kwargs)
|
kwargs.update(subprocess_kwargs)
|
||||||
|
|
||||||
self._process: subprocess.Popen = self._spawn_process(args, **kwargs)
|
# Ensure attribute is assigned even in the case of errors
|
||||||
|
self._process: subprocess.Popen = MISSING
|
||||||
|
self._process = self._spawn_process(args, **kwargs)
|
||||||
self._stdout: IO[bytes] = self._process.stdout # type: ignore # process stdout is explicitly set
|
self._stdout: IO[bytes] = self._process.stdout # type: ignore # process stdout is explicitly set
|
||||||
self._stdin: Optional[IO[bytes]] = None
|
self._stdin: Optional[IO[bytes]] = None
|
||||||
self._pipe_thread: Optional[threading.Thread] = None
|
self._pipe_thread: Optional[threading.Thread] = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user