Browse Source

[douyutv] Simplify usage of isinstance

master
Yen Chi Hsuan 9 years ago
parent
commit
2ddf083588
1 changed files with 1 additions and 1 deletions
  1. 2
      youtube_dl/extractor/douyutv.py

2
youtube_dl/extractor/douyutv.py

@ -67,7 +67,7 @@ class DouyuTVIE(InfoExtractor):
error_code = config.get('error', 0)
if error_code is not 0:
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
raise ExtractorError(error_desc, expected=True)

Loading…
Cancel
Save