]> git.bitcoin.ninja Git - youtube-dl/commitdiff
lazy extractors: Fix building with python2.6
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sun, 21 Feb 2016 10:53:48 +0000 (11:53 +0100)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Fri, 8 Apr 2016 19:50:07 +0000 (21:50 +0200)
devscripts/make_lazy_extractors.py

index 8627d0b1caf0cc75bab891866cba2291eb0217bf..5d0ddb40180715c5e2d5db17075190e7909708d1 100644 (file)
@@ -30,7 +30,7 @@ class {name}(LazyLoadExtractor):
 make_valid_template = '''
     @classmethod
     def _make_valid_url(cls):
-        return {!r}
+        return {valid_url!r}
 '''
 
 
@@ -44,7 +44,7 @@ def build_lazy_ie(ie, name):
         s += getsource(ie.suitable)
     if hasattr(ie, '_make_valid_url'):
         # search extractors
-        s += make_valid_template.format(ie._make_valid_url())
+        s += make_valid_template.format(valid_url=ie._make_valid_url())
     return s
 
 names = []
@@ -55,7 +55,7 @@ for ie in _ALL_CLASSES:
     names.append(name)
 
 module_contents.append(
-    '_ALL_CLASSES = [{}]'.format(', '.join(names)))
+    '_ALL_CLASSES = [{0}]'.format(', '.join(names)))
 
 module_src = '\n'.join(module_contents)