aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dlc/downloader/rtmp.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan@gmail.com>2021-01-09 17:56:12 +0530
committerpukkandan <pukkandan@gmail.com>2021-01-09 18:08:07 +0530
commitf5b1bca9139fcbac76dca3a6b17e69f53a885988 (patch)
tree2426a3eef3733d998bdcd0ac3d56a42f155ce7d7 /youtube_dlc/downloader/rtmp.py
parentd9eebbc7471b97f3aa58939685bd7b8f4ce35b1e (diff)
downloadhypervideo-pre-f5b1bca9139fcbac76dca3a6b17e69f53a885988.tar.lz
hypervideo-pre-f5b1bca9139fcbac76dca3a6b17e69f53a885988.tar.xz
hypervideo-pre-f5b1bca9139fcbac76dca3a6b17e69f53a885988.zip
Kill child processes when yt-dlc is killed (https://github.com/ytdl-org/youtube-dl/pull/26592)
Authored by: Unrud
Diffstat (limited to 'youtube_dlc/downloader/rtmp.py')
-rw-r--r--youtube_dlc/downloader/rtmp.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/youtube_dlc/downloader/rtmp.py b/youtube_dlc/downloader/rtmp.py
index fbb7f51b0..8a25dbc8d 100644
--- a/youtube_dlc/downloader/rtmp.py
+++ b/youtube_dlc/downloader/rtmp.py
@@ -89,11 +89,13 @@ class RtmpFD(FileDownloader):
self.to_screen('')
cursor_in_new_line = True
self.to_screen('[rtmpdump] ' + line)
- finally:
+ if not cursor_in_new_line:
+ self.to_screen('')
+ return proc.wait()
+ except BaseException: # Including KeyboardInterrupt
+ proc.kill()
proc.wait()
- if not cursor_in_new_line:
- self.to_screen('')
- return proc.returncode
+ raise
url = info_dict['url']
player_url = info_dict.get('player_url')