Remove dead code
authorPhilipp Hagemeister <phihag@phihag.de>
Mon, 23 Dec 2013 15:03:06 +0000 (16:03 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Mon, 23 Dec 2013 15:03:06 +0000 (16:03 +0100)
youtube_dl/downloader/common.py
youtube_dl/downloader/http.py
youtube_dl/extractor/bliptv.py

index e9c9b4473a16ed47ebe3eb74274c9ce952193358..10143d56a201ca9d7b9b919ab38880adea0c1cf6 100644 (file)
@@ -1,7 +1,5 @@
-import math
 import os
 import re
-import subprocess
 import sys
 import time
 
@@ -175,7 +173,7 @@ class FileDownloader(object):
                 return
             os.rename(encodeFilename(old_filename), encodeFilename(new_filename))
         except (IOError, OSError) as err:
-            self.report_error(u'unable to rename file')
+            self.report_error(u'unable to rename file: %s' % str(err))
 
     def try_utime(self, filename, last_modified_hdr):
         """Try to set the last-modified time of the given file."""
@@ -279,8 +277,6 @@ class FileDownloader(object):
         """Download to a filename using the info from info_dict
         Return True on success and False otherwise
         """
-        url = info_dict['url']
-
         # Check file already present
         if self.params.get('continuedl', False) and os.path.isfile(encodeFilename(filename)) and not self.params.get('nopart', False):
             self.report_file_already_downloaded(filename)
@@ -290,8 +286,8 @@ class FileDownloader(object):
                 'total_bytes': os.path.getsize(encodeFilename(filename)),
             })
             return True
-        else:
-            return self.real_download(filename, info_dict)
+
+        return self.real_download(filename, info_dict)
 
     def real_download(self, filename, info_dict):
         """Real download process. Redefine in subclasses."""
index dbc5af3ca619b6b4086203ce2a7bcbf3a1897a33..14b88efd3d951345effe95959f72a82575e094d5 100644 (file)
@@ -1,7 +1,4 @@
 import os
-import re
-import subprocess
-import sys
 import time
 
 from .common import FileDownloader
index a32891c1749f286873fd6b966ccaf8e9808633fb..c7e0a53c12d61bd450438d67bf1f5b538c13e665 100644 (file)
@@ -1,6 +1,5 @@
 import datetime
 import json
-import os
 import re
 import socket
 
@@ -66,7 +65,6 @@ class BlipTVIE(InfoExtractor):
         request = compat_urllib_request.Request(json_url)
         request.add_header('User-Agent', 'iTunes/10.6.1')
         self.report_extraction(mobj.group(1))
-        info = None
         urlh = self._request_webpage(request, None, False,
             u'unable to download video info webpage')