[compat] Beautify assertion
authorPhilipp Hagemeister <phihag@phihag.de>
Wed, 26 Nov 2014 10:48:09 +0000 (11:48 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Wed, 26 Nov 2014 10:48:09 +0000 (11:48 +0100)
youtube_dl/compat.py

index 2983501aeb44feecf1bd335d5782f455a52f4edb..27596687d0d2c354990e6112027e054865c1c79c 100644 (file)
@@ -270,7 +270,7 @@ if sys.version_info < (3, 0):
         print(s.encode(preferredencoding(), 'xmlcharrefreplace'))
 else:
     def compat_print(s):
-        assert type(s) == type(u'')
+        assert isinstance(s, compat_str)
         print(s)