aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/YoutubeDL.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-12-20 06:29:36 +0600
committerSergey M․ <dstftw@gmail.com>2015-12-20 06:29:36 +0600
commitc0384f221e5a8383c377a3c43f634cf9807eb634 (patch)
treeec9cead244eae66b0af02351bd253d4662f2a518 /youtube_dl/YoutubeDL.py
parent8e60dc7526596f456c0b5d7dc48daa6cae08ebb6 (diff)
downloadyoutube-dl-c0384f221e5a8383c377a3c43f634cf9807eb634.tar.xz
Use proper encoding on compat_str construction when necessary
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rwxr-xr-xyoutube_dl/YoutubeDL.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index 57df6a279..1795097ae 100755
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -47,6 +47,7 @@ from .utils import (
DEFAULT_OUTTMPL,
determine_ext,
DownloadError,
+ encode_compat_str,
encodeFilename,
error_to_str,
ExtractorError,
@@ -496,7 +497,7 @@ class YoutubeDL(object):
tb = ''
if hasattr(sys.exc_info()[1], 'exc_info') and sys.exc_info()[1].exc_info[0]:
tb += ''.join(traceback.format_exception(*sys.exc_info()[1].exc_info))
- tb += compat_str(traceback.format_exc())
+ tb += encode_compat_str(traceback.format_exc())
else:
tb_data = traceback.format_list(traceback.extract_stack())
tb = ''.join(tb_data)
@@ -682,7 +683,7 @@ class YoutubeDL(object):
raise
except Exception as e:
if self.params.get('ignoreerrors', False):
- self.report_error(error_to_str(e), tb=compat_str(traceback.format_exc()))
+ self.report_error(error_to_str(e), tb=encode_compat_str(traceback.format_exc()))
break
else:
raise