1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-03 16:45:17 +00:00

[cleanup] Misc cleanup and refactor (#2173)

This commit is contained in:
pukkandan
2022-04-18 02:28:28 +05:30
parent b6dc37fe2a
commit 19a0394044
31 changed files with 263 additions and 345 deletions

View File

@ -1,4 +1,5 @@
import asyncio
import contextlib
import os
import signal
import threading
@ -29,11 +30,9 @@ class FFmpegSinkFD(FileDownloader):
except (BrokenPipeError, OSError):
pass
finally:
try:
with contextlib.suppress(OSError):
stdin.flush()
stdin.close()
except OSError:
pass
os.kill(os.getpid(), signal.SIGINT)
class FFmpegStdinFD(FFmpegFD):