[downloader/external] Decode error string before writing to stderr
authorSergey M․ <dstftw@gmail.com>
Sun, 12 Jun 2016 09:45:07 +0000 (16:45 +0700)
committerSergey M․ <dstftw@gmail.com>
Sun, 12 Jun 2016 09:45:07 +0000 (16:45 +0700)
youtube_dl/downloader/external.py

index 3ff1f9ed4c1dea1c3b30032909651b50f706dfea..fae2450248494a70f237a65d07a4bedcfddaadeb 100644 (file)
@@ -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