[yandexmusic] Improve error handling

This commit is contained in:
Sergey M․ 2016-04-28 21:37:34 +06:00
parent 0cbcbdd89d
commit eebe6b382e
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D

View file

@ -18,6 +18,7 @@ from ..utils import (
class YandexMusicBaseIE(InfoExtractor):
@staticmethod
def _handle_error(response):
if isinstance(response, dict):
error = response.get('error')
if error:
raise ExtractorError(error, expected=True)