aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/YoutubeDL.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-12-20 07:00:39 +0600
committerSergey M․ <dstftw@gmail.com>2015-12-20 07:00:39 +0600
commit9b9c5355e4c0fe6f9028aaa3b1b8beb28a085433 (patch)
treea1c288b01778d4d8e0c661ed0766f149fb2532ba /youtube_dl/YoutubeDL.py
parentd890b4cc0ac6b88daa917a1a791afe7541cd0411 (diff)
Rename error_to_str to error_to_compat_str
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rwxr-xr-xyoutube_dl/YoutubeDL.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index bf05e9340..50425b8d7 100755
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -49,7 +49,7 @@ from .utils import (
DownloadError,
encode_compat_str,
encodeFilename,
- error_to_str,
+ error_to_compat_str,
ExtractorError,
format_bytes,
formatSeconds,
@@ -683,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=encode_compat_str(traceback.format_exc()))
+ self.report_error(error_to_compat_str(e), tb=encode_compat_str(traceback.format_exc()))
break
else:
raise
@@ -1461,7 +1461,7 @@ class YoutubeDL(object):
if dn and not os.path.exists(dn):
os.makedirs(dn)
except (OSError, IOError) as err:
- self.report_error('unable to create directory ' + error_to_str(err))
+ self.report_error('unable to create directory ' + error_to_compat_str(err))
return
if self.params.get('writedescription', False):
@@ -1512,7 +1512,7 @@ class YoutubeDL(object):
sub_info['url'], info_dict['id'], note=False)
except ExtractorError as err:
self.report_warning('Unable to download subtitle for "%s": %s' %
- (sub_lang, error_to_str(err.cause)))
+ (sub_lang, error_to_compat_str(err.cause)))
continue
try:
sub_filename = subtitles_filename(filename, sub_lang, sub_format)
@@ -2041,4 +2041,4 @@ class YoutubeDL(object):
(info_dict['extractor'], info_dict['id'], thumb_display_id, thumb_filename))
except (compat_urllib_error.URLError, compat_http_client.HTTPException, socket.error) as err:
self.report_warning('Unable to download thumbnail "%s": %s' %
- (t['url'], error_to_str(err)))
+ (t['url'], error_to_compat_str(err)))