Sfoglia il codice sorgente

[eagleplatform] Make _handle_error staticmethod

Sergey M․ 10 anni fa
parent
commit
3c63e1bb57
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      youtube_dl/extractor/eagleplatform.py

+ 2 - 1
youtube_dl/extractor/eagleplatform.py

@@ -48,7 +48,8 @@ class EaglePlatformIE(InfoExtractor):
         'skip': 'Georestricted',
         'skip': 'Georestricted',
     }]
     }]
 
 
-    def _handle_error(self, response):
+    @staticmethod
+    def _handle_error(response):
         status = int_or_none(response.get('status', 200))
         status = int_or_none(response.get('status', 200))
         if status != 200:
         if status != 200:
             raise ExtractorError(' '.join(response['errors']), expected=True)
             raise ExtractorError(' '.join(response['errors']), expected=True)