Properly convert errors to strings
This commit is contained in:
parent
fdae235858
commit
7f8b271465
6 changed files with 17 additions and 19 deletions
|
@ -7,10 +7,10 @@ import itertools
|
|||
|
||||
from .common import InfoExtractor
|
||||
|
||||
from ..compat import compat_str
|
||||
from ..utils import (
|
||||
ExtractorError,
|
||||
determine_ext,
|
||||
error_to_str,
|
||||
ExtractorError,
|
||||
int_or_none,
|
||||
parse_iso8601,
|
||||
sanitized_Request,
|
||||
|
@ -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' % compat_str(err))
|
||||
self._downloader.report_warning('unable to download video subtitles: %s' % error_to_str(err))
|
||||
return {}
|
||||
info = json.loads(sub_list)
|
||||
if (info['total'] > 0):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue