[utils] Popen: Refactor to use contextmanager

Fixes https://github.com/yt-dlp/yt-dlp/issues/3531#issuecomment-1156223597
This commit is contained in:
pukkandan 2022-06-16 02:25:43 +05:30
parent 560738f34d
commit f0c9fb9682
No known key found for this signature in database
GPG key ID: 7EEE9E1E817D0A39
9 changed files with 98 additions and 123 deletions

View file

@ -92,8 +92,7 @@ class RtmpFD(FileDownloader):
self.to_screen('')
return proc.wait()
except BaseException: # Including KeyboardInterrupt
proc.kill()
proc.wait()
proc.kill(timeout=None)
raise
url = info_dict['url']