aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/downloader
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-12-23 16:03:06 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2013-12-23 16:03:06 +0100
commitdabc127362ddfe88996e72b7e0d5cd2e4f239c98 (patch)
tree9007fdc3f1f410776d891483c8f465d09caabe3a /youtube_dl/downloader
parentc25c991809e10dc8fd4bc2ddf37f8675cbd818fb (diff)
Remove dead code
Diffstat (limited to 'youtube_dl/downloader')
-rw-r--r--youtube_dl/downloader/common.py10
-rw-r--r--youtube_dl/downloader/http.py3
2 files changed, 3 insertions, 10 deletions
diff --git a/youtube_dl/downloader/common.py b/youtube_dl/downloader/common.py
index e9c9b4473..10143d56a 100644
--- a/youtube_dl/downloader/common.py
+++ b/youtube_dl/downloader/common.py
@@ -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."""
diff --git a/youtube_dl/downloader/http.py b/youtube_dl/downloader/http.py
index dbc5af3ca..14b88efd3 100644
--- a/youtube_dl/downloader/http.py
+++ b/youtube_dl/downloader/http.py
@@ -1,7 +1,4 @@
import os
-import re
-import subprocess
-import sys
import time
from .common import FileDownloader