aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/downloader
diff options
context:
space:
mode:
authorJouke Waleson <jouke.waleson@mendix.com>2014-11-23 20:41:03 +0100
committerJouke Waleson <jouke.waleson@mendix.com>2014-11-23 20:41:03 +0100
commit5f6a1245ffa9276c1af59b0835afeef67e2fb5b1 (patch)
tree139c6ede405cf3898e4639f0bf13d32d140fa5f1 /youtube_dl/downloader
parent598c218f7b5c3e78f98dad40f45646c0c9ec773e (diff)
downloadyoutube-dl-5f6a1245ffa9276c1af59b0835afeef67e2fb5b1.tar.xz
PEP8 applied
Diffstat (limited to 'youtube_dl/downloader')
-rw-r--r--youtube_dl/downloader/common.py6
-rw-r--r--youtube_dl/downloader/hls.py1
-rw-r--r--youtube_dl/downloader/rtmp.py2
3 files changed, 4 insertions, 5 deletions
diff --git a/youtube_dl/downloader/common.py b/youtube_dl/downloader/common.py
index 7c33004b1..c0af50c59 100644
--- a/youtube_dl/downloader/common.py
+++ b/youtube_dl/downloader/common.py
@@ -81,7 +81,7 @@ class FileDownloader(object):
if total is None:
return None
dif = now - start
- if current == 0 or dif < 0.001: # One millisecond
+ if current == 0 or dif < 0.001: # One millisecond
return None
rate = float(current) / dif
return int((float(total) - float(current)) / rate)
@@ -95,7 +95,7 @@ class FileDownloader(object):
@staticmethod
def calc_speed(start, now, bytes):
dif = now - start
- if bytes == 0 or dif < 0.001: # One millisecond
+ if bytes == 0 or dif < 0.001: # One millisecond
return None
return float(bytes) / dif
@@ -108,7 +108,7 @@ class FileDownloader(object):
@staticmethod
def best_block_size(elapsed_time, bytes):
new_min = max(bytes / 2.0, 1.0)
- new_max = min(max(bytes * 2.0, 1.0), 4194304) # Do not surpass 4 MB
+ new_max = min(max(bytes * 2.0, 1.0), 4194304) # Do not surpass 4 MB
if elapsed_time < 0.001:
return int(new_max)
rate = bytes / elapsed_time
diff --git a/youtube_dl/downloader/hls.py b/youtube_dl/downloader/hls.py
index 68eafa403..0c33d39ee 100644
--- a/youtube_dl/downloader/hls.py
+++ b/youtube_dl/downloader/hls.py
@@ -101,4 +101,3 @@ class NativeHlsFD(FileDownloader):
})
self.try_rename(tmpfilename, filename)
return True
-
diff --git a/youtube_dl/downloader/rtmp.py b/youtube_dl/downloader/rtmp.py
index 17d9631fa..b8e104c59 100644
--- a/youtube_dl/downloader/rtmp.py
+++ b/youtube_dl/downloader/rtmp.py
@@ -180,7 +180,7 @@ class RtmpFD(FileDownloader):
while (retval == RD_INCOMPLETE or retval == RD_FAILED) and not test and not live:
prevsize = os.path.getsize(encodeFilename(tmpfilename))
self.to_screen('[rtmpdump] %s bytes' % prevsize)
- time.sleep(5.0) # This seems to be needed
+ time.sleep(5.0) # This seems to be needed
retval = run_rtmpdump(basic_args + ['-e'] + [[], ['-k', '1']][retval == RD_FAILED])
cursize = os.path.getsize(encodeFilename(tmpfilename))
if prevsize == cursize and retval == RD_FAILED: