aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/downloader/common.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2022-05-20 20:49:30 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-05-20 21:03:19 +0530
commit666c36d58dfacc8998952569cc2d9c414957c53d (patch)
tree17f1e9b265c1314e4d33e0af2673dbd953bfdcd5 /yt_dlp/downloader/common.py
parent854b0d325e36acddef7a798be21a98756d86ca89 (diff)
downloadhypervideo-pre-666c36d58dfacc8998952569cc2d9c414957c53d.tar.lz
hypervideo-pre-666c36d58dfacc8998952569cc2d9c414957c53d.tar.xz
hypervideo-pre-666c36d58dfacc8998952569cc2d9c414957c53d.zip
Bugfix for 23326151c45b632c3d5948bd018e80abb370e676
Diffstat (limited to 'yt_dlp/downloader/common.py')
-rw-r--r--yt_dlp/downloader/common.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/yt_dlp/downloader/common.py b/yt_dlp/downloader/common.py
index 0b3383071..276675532 100644
--- a/yt_dlp/downloader/common.py
+++ b/yt_dlp/downloader/common.py
@@ -18,8 +18,8 @@ from ..utils import (
decodeArgument,
encodeFilename,
error_to_compat_str,
+ float_or_none,
format_bytes,
- int_or_none,
sanitize_open,
shell_quote,
timeconvert,
@@ -406,9 +406,9 @@ class FileDownloader:
def sleep_retry(self, retry_type, count):
sleep_func = self.params.get('retry_sleep_functions', {}).get(retry_type)
- delay = int_or_none(sleep_func(n=count - 1)) if sleep_func else None
+ delay = float_or_none(sleep_func(n=count - 1)) if sleep_func else None
if delay:
- self.__to_screen(f'Sleeping {delay} seconds ...')
+ self.__to_screen(f'Sleeping {delay:.2f} seconds ...')
time.sleep(delay)
return sleep_func is not None