]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/postprocessor/embedthumbnail.py
Don't create console for subprocesses on Windows (#1261)
[yt-dlp.git] / yt_dlp / postprocessor / embedthumbnail.py
index 3139a6338824ac9562e1a0f35be0cfc64f2f6cf1..918d3e78871d37a078cdf2bad02899b9c2d69bdb 100644 (file)
@@ -26,9 +26,9 @@
     encodeArgument,
     encodeFilename,
     error_to_compat_str,
+    Popen,
     PostProcessingError,
     prepend_extension,
-    process_communicate_or_kill,
     shell_quote,
 )
 
@@ -183,8 +183,8 @@ def run(self, info):
 
                 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)