diff options
author | Philipp Hagemeister <[email protected]> | 2013-05-04 08:38:28 +0200 |
---|---|---|
committer | Philipp Hagemeister <[email protected]> | 2013-05-04 08:38:28 +0200 |
commit | decd1d17372093f8a607e16232fe633a6559dab1 (patch) | |
tree | a19fa405dce72918727f4c71f24b024332f7b875 /youtube_dl | |
parent | 180e689f7e590e2987c00dee684ec205bc6b9933 (diff) | |
download | youtube-dl-decd1d17372093f8a607e16232fe633a6559dab1.tar.gz youtube-dl-decd1d17372093f8a607e16232fe633a6559dab1.zip |
raise ExtractorError instead of calling back
Diffstat (limited to 'youtube_dl')
-rwxr-xr-x | youtube_dl/InfoExtractors.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py index 79182208d..568bca702 100755 --- a/youtube_dl/InfoExtractors.py +++ b/youtube_dl/InfoExtractors.py @@ -3322,8 +3322,7 @@ class JustinTVIE(InfoExtractor): response = json.loads(webpage) if type(response) != list: error_text = response.get('error', 'unknown error') - self._downloader.report_error(u'Justin.tv API: %s' % error_text) - return + raise ExtractorError(u'Justin.tv API: %s' % error_text) info = [] for clip in response: video_url = clip['video_file_url'] @@ -3382,8 +3381,7 @@ class FunnyOrDieIE(InfoExtractor): def _real_extract(self, url): mobj = re.match(self._VALID_URL, url) if mobj is None: - self._downloader.report_error(u'invalid URL: %s' % url) - return + raise ExtractorError(u'invalid URL: %s' % url) video_id = mobj.group('id') webpage = self._download_webpage(url, video_id) |