Rename error_to_str to error_to_compat_str
This commit is contained in:
parent
d890b4cc0a
commit
9b9c5355e4
7 changed files with 17 additions and 17 deletions
|
@ -30,7 +30,7 @@ from ..utils import (
|
|||
clean_html,
|
||||
compiled_regex_type,
|
||||
determine_ext,
|
||||
error_to_str,
|
||||
error_to_compat_str,
|
||||
ExtractorError,
|
||||
fix_xml_ampersands,
|
||||
float_or_none,
|
||||
|
@ -334,7 +334,7 @@ class InfoExtractor(object):
|
|||
if errnote is None:
|
||||
errnote = 'Unable to download webpage'
|
||||
|
||||
errmsg = '%s: %s' % (errnote, error_to_str(err))
|
||||
errmsg = '%s: %s' % (errnote, error_to_compat_str(err))
|
||||
if fatal:
|
||||
raise ExtractorError(errmsg, sys.exc_info()[2], cause=err)
|
||||
else:
|
||||
|
@ -624,7 +624,7 @@ class InfoExtractor(object):
|
|||
else:
|
||||
raise netrc.NetrcParseError('No authenticators for %s' % self._NETRC_MACHINE)
|
||||
except (IOError, netrc.NetrcParseError) as err:
|
||||
self._downloader.report_warning('parsing .netrc: %s' % error_to_str(err))
|
||||
self._downloader.report_warning('parsing .netrc: %s' % error_to_compat_str(err))
|
||||
|
||||
return (username, password)
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ from .common import InfoExtractor
|
|||
|
||||
from ..utils import (
|
||||
determine_ext,
|
||||
error_to_str,
|
||||
error_to_compat_str,
|
||||
ExtractorError,
|
||||
int_or_none,
|
||||
parse_iso8601,
|
||||
|
@ -278,7 +278,7 @@ class DailymotionIE(DailymotionBaseInfoExtractor):
|
|||
'https://api.dailymotion.com/video/%s/subtitles?fields=id,language,url' % video_id,
|
||||
video_id, note=False)
|
||||
except ExtractorError as err:
|
||||
self._downloader.report_warning('unable to download video subtitles: %s' % error_to_str(err))
|
||||
self._downloader.report_warning('unable to download video subtitles: %s' % error_to_compat_str(err))
|
||||
return {}
|
||||
info = json.loads(sub_list)
|
||||
if (info['total'] > 0):
|
||||
|
|
|
@ -11,7 +11,7 @@ from ..compat import (
|
|||
compat_urllib_parse_unquote,
|
||||
)
|
||||
from ..utils import (
|
||||
error_to_str,
|
||||
error_to_compat_str,
|
||||
ExtractorError,
|
||||
limit_length,
|
||||
sanitized_Request,
|
||||
|
@ -116,7 +116,7 @@ class FacebookIE(InfoExtractor):
|
|||
if re.search(r'id="checkpointSubmitButton"', check_response) is not None:
|
||||
self._downloader.report_warning('Unable to confirm login, you have to login in your brower and authorize the login.')
|
||||
except (compat_urllib_error.URLError, compat_http_client.HTTPException, socket.error) as err:
|
||||
self._downloader.report_warning('unable to log in: %s' % error_to_str(err))
|
||||
self._downloader.report_warning('unable to log in: %s' % error_to_compat_str(err))
|
||||
return
|
||||
|
||||
def _real_initialize(self):
|
||||
|
|
|
@ -26,7 +26,7 @@ from ..compat import (
|
|||
from ..utils import (
|
||||
clean_html,
|
||||
encode_dict,
|
||||
error_to_str,
|
||||
error_to_compat_str,
|
||||
ExtractorError,
|
||||
float_or_none,
|
||||
get_element_by_attribute,
|
||||
|
@ -904,7 +904,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||
'https://video.google.com/timedtext?hl=en&type=list&v=%s' % video_id,
|
||||
video_id, note=False)
|
||||
except ExtractorError as err:
|
||||
self._downloader.report_warning('unable to download video subtitles: %s' % error_to_str(err))
|
||||
self._downloader.report_warning('unable to download video subtitles: %s' % error_to_compat_str(err))
|
||||
return {}
|
||||
|
||||
sub_lang_list = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue