diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-08-22 06:19:06 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-08-22 06:19:06 +0530 |
commit | 992dc6b4863d0e60f2a1ce3933f67814d8a17f8d (patch) | |
tree | b5ee32fddbc6270f2221ba4f0eaf2abc81a31dc8 /yt_dlp/utils.py | |
parent | 822d66e591341f8bf082be371b4beb66d72ba080 (diff) | |
download | hypervideo-pre-992dc6b4863d0e60f2a1ce3933f67814d8a17f8d.tar.lz hypervideo-pre-992dc6b4863d0e60f2a1ce3933f67814d8a17f8d.tar.xz hypervideo-pre-992dc6b4863d0e60f2a1ce3933f67814d8a17f8d.zip |
[jsinterp] Implement timeout
Workaround for #4716
Diffstat (limited to 'yt_dlp/utils.py')
-rw-r--r-- | yt_dlp/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py index 49ee22865..13768d846 100644 --- a/yt_dlp/utils.py +++ b/yt_dlp/utils.py @@ -860,9 +860,9 @@ class Popen(subprocess.Popen): self.wait(timeout=timeout) @classmethod - def run(cls, *args, **kwargs): + def run(cls, *args, timeout=None, **kwargs): with cls(*args, **kwargs) as proc: - stdout, stderr = proc.communicate_or_kill() + stdout, stderr = proc.communicate_or_kill(timeout=timeout) return stdout or '', stderr or '', proc.returncode |