瀏覽代碼

[downloader/external] Decode error string before writing to stderr

Sergey M․ 9 年之前
父節點
當前提交
e69f9f5d68
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      youtube_dl/downloader/external.py

+ 1 - 1
youtube_dl/downloader/external.py

@@ -85,7 +85,7 @@ class ExternalFD(FileDownloader):
             cmd, stderr=subprocess.PIPE)
             cmd, stderr=subprocess.PIPE)
         _, stderr = p.communicate()
         _, stderr = p.communicate()
         if p.returncode != 0:
         if p.returncode != 0:
-            self.to_stderr(stderr)
+            self.to_stderr(stderr.decode('utf-8', 'replace'))
         return p.returncode
         return p.returncode