1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-04 16:54:33 -04: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

@@ -26,9 +26,9 @@ from ..utils import (
encodeArgument,
encodeFilename,
error_to_compat_str,
Popen,
PostProcessingError,
prepend_extension,
process_communicate_or_kill,
shell_quote,
)
@@ -183,8 +183,8 @@ class EmbedThumbnailPP(FFmpegPostProcessor):
self._report_run('atomicparsley', filename)
self.write_debug('AtomicParsley command line: %s' % shell_quote(cmd))
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = process_communicate_or_kill(p)
p = Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = p.communicate_or_kill()
if p.returncode != 0:
msg = stderr.decode('utf-8', 'replace').strip()
raise EmbedThumbnailPPError(msg)