1
0
Fork 0
mirror of https://github.com/blackjack4494/yt-dlc.git synced 2024-12-23 16:26:40 +00:00

[douyutv] Simplify usage of isinstance

This commit is contained in:
Yen Chi Hsuan 2015-03-29 18:17:48 +08:00
parent 8343a03357
commit 2ddf083588

View file

@ -67,7 +67,7 @@ class DouyuTVIE(InfoExtractor):
error_code = config.get('error', 0) error_code = config.get('error', 0)
if error_code is not 0: if error_code is not 0:
error_desc = 'Server reported error %i' % error_code error_desc = 'Server reported error %i' % error_code
if isinstance(data, compat_str) or isinstance(data, compat_basestring): if isinstance(data, (compat_str, compat_basestring)):
error_desc += ': ' + data error_desc += ': ' + data
raise ExtractorError(error_desc, expected=True) raise ExtractorError(error_desc, expected=True)