Explorar o código

[youtube] Remove useless if

Philipp Hagemeister %!s(int64=10) %!d(string=hai) anos
pai
achega
785521bf4f
Modificáronse 1 ficheiros con 3 adicións e 4 borrados
  1. 3 4
      youtube_dl/extractor/youtube.py

+ 3 - 4
youtube_dl/extractor/youtube.py

@@ -562,10 +562,9 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
         else:
             assert False, 'Invalid player type %r' % player_type
 
-        if cache_spec is None:
-            test_string = ''.join(map(compat_chr, range(len(example_sig))))
-            cache_res = res(test_string)
-            cache_spec = [ord(c) for c in cache_res]
+        test_string = ''.join(map(compat_chr, range(len(example_sig))))
+        cache_res = res(test_string)
+        cache_spec = [ord(c) for c in cache_res]
 
         self._downloader.cache.store('youtube-sigfuncs', func_id, cache_spec)
         return res