]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[douyutv] Simplify usage of isinstance
authorYen Chi Hsuan <yan12125@gmail.com>
Sun, 29 Mar 2015 10:17:48 +0000 (18:17 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Sun, 29 Mar 2015 10:17:48 +0000 (18:17 +0800)
youtube_dl/extractor/douyutv.py

index 3a1665ab4ba24eff9e95d8a424379e32c54f1a97..479430c51072ab91e976df4d459af372c5608cdd 100644 (file)
@@ -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)