Explorar o código

Ok, the Escapist test was passing only in my Travis repo, do not ask me why; also, a small bugfix to the latest commit

Filippo Valsorda %!s(int64=12) %!d(string=hai) anos
pai
achega
0214ce7c75
Modificáronse 2 ficheiros con 3 adicións e 2 borrados
  1. 2 1
      test/tests.json
  2. 1 1
      youtube_dl/FileDownloader.py

+ 2 - 1
test/tests.json

@@ -95,7 +95,8 @@
     "name": "Escapist",
     "name": "Escapist",
     "url": "http://www.escapistmagazine.com/videos/view/the-escapist-presents/6618-Breaking-Down-Baldurs-Gate",
     "url": "http://www.escapistmagazine.com/videos/view/the-escapist-presents/6618-Breaking-Down-Baldurs-Gate",
     "file": "6618-Breaking-Down-Baldurs-Gate.flv",
     "file": "6618-Breaking-Down-Baldurs-Gate.flv",
-    "md5": "c6793dbda81388f4264c1ba18684a74d"
+    "md5": "c6793dbda81388f4264c1ba18684a74d",
+    "skip": "Fails with timeout on Travis"
   },
   },
   {
   {
     "name": "GooglePlus",
     "name": "GooglePlus",

+ 1 - 1
youtube_dl/FileDownloader.py

@@ -494,7 +494,7 @@ class FileDownloader(object):
                 # Extract information from URL and process it
                 # Extract information from URL and process it
                 videos = ie.extract(url)
                 videos = ie.extract(url)
 
 
-                if len(videos) > 1 and self.fixed_template():
+                if len(videos or []) > 1 and self.fixed_template():
                     raise SameFileError(self.params['outtmpl'])
                     raise SameFileError(self.params['outtmpl'])
 
 
                 for video in videos or []:
                 for video in videos or []: