From 2ddf08358861a3c0f8724020c4eaf119e6be21a2 Mon Sep 17 00:00:00 2001 From: Yen Chi Hsuan Date: Sun, 29 Mar 2015 18:17:48 +0800 Subject: [PATCH] [douyutv] Simplify usage of isinstance --- youtube_dl/extractor/douyutv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.40.0