mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-10-04 19:44:33 -04:00
@@ -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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user