From: Yen Chi Hsuan Date: Sun, 29 Mar 2015 10:17:48 +0000 (+0800) Subject: [douyutv] Simplify usage of isinstance X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=2ddf08358861a3c0f8724020c4eaf119e6be21a2;p=youtube-dl [douyutv] Simplify usage of isinstance --- diff --git a/youtube_dl/extractor/douyutv.py b/youtube_dl/extractor/douyutv.py index 3a1665ab4..479430c51 100644 --- a/youtube_dl/extractor/douyutv.py +++ b/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)