From 39af63024dd41450141388ca4304bf6f043ba3f2 Mon Sep 17 00:00:00 2001 From: stepshal Date: Tue, 14 Jun 2016 00:06:08 +0700 Subject: [PATCH] Use isinstance() instead of type() for a typecheck. --- youtube_dl/YoutubeDL.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index 5036289b0..93c7adbee 100755 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -1953,7 +1953,7 @@ class YoutubeDL(object): if not self.params.get('verbose'): return - if type('') is not compat_str: + if isinstance('') is not compat_str: # Python 2.6 on SLES11 SP1 (https://github.com/rg3/youtube-dl/issues/3326) self.report_warning( 'Your Python is broken! Update to a newer and supported version')