소스 검색

Throw a better error if the protocol is invalid

Philipp Hagemeister 12 년 전
부모
커밋
419c64b107
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      youtube_dl/InfoExtractors.py

+ 2 - 0
youtube_dl/InfoExtractors.py

@@ -1304,6 +1304,8 @@ class GenericIE(InfoExtractor):
             opener.add_handler(handler())
 
         response = opener.open(HeadRequest(url))
+        if response is None:
+            raise ExtractorError(u'Invalid URL protocol')
         new_url = response.geturl()
 
         if url == new_url: