Преглед на файлове

[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)
         _, stderr = p.communicate()
         if p.returncode != 0:
-            self.to_stderr(stderr)
+            self.to_stderr(stderr.decode('utf-8', 'replace'))
         return p.returncode