summary refs log tree commit diff
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2015-03-29 18:17:48 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2015-03-29 18:17:48 +0800
commit2ddf08358861a3c0f8724020c4eaf119e6be21a2 (patch)
treeb1e57adb7d6adcd703523f7ead2b0762c15fed9d
parent8343a03357ec4edb49b29bc841f2410ee4b610d1 (diff)
downloadyoutube-dl-2ddf08358861a3c0f8724020c4eaf119e6be21a2.tar.gz
youtube-dl-2ddf08358861a3c0f8724020c4eaf119e6be21a2.tar.xz
youtube-dl-2ddf08358861a3c0f8724020c4eaf119e6be21a2.zip
[douyutv] Simplify usage of isinstance
-rw-r--r--youtube_dl/extractor/douyutv.py2
1 files changed, 1 insertions, 1 deletions
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)