1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-03 08:35:32 +00:00

Don't create console for subprocesses on Windows (#1261)

Closes #1251
This commit is contained in:
pukkandan
2021-10-20 21:49:40 +05:30
committed by GitHub
parent b4b855ebc7
commit d3c93ec2b7
10 changed files with 63 additions and 58 deletions

View File

@ -11,9 +11,9 @@ from ..utils import (
encodeFilename,
shell_quote,
str_or_none,
Popen,
PostProcessingError,
prepend_extension,
process_communicate_or_kill,
)
@ -81,8 +81,8 @@ class SponSkrubPP(PostProcessor):
self.write_debug('sponskrub command line: %s' % shell_quote(cmd))
pipe = None if self.get_param('verbose') else subprocess.PIPE
p = subprocess.Popen(cmd, stdout=pipe)
stdout = process_communicate_or_kill(p)[0]
p = Popen(cmd, stdout=pipe)
stdout = p.communicate_or_kill()[0]
if p.returncode == 0:
os.replace(temp_filename, filename)