Browse Source

downloaders.py: Reset return code to zero when killing child process

Fixes: b2fcc5e546
Related to: #244
doc-issue-template
MrS0m30n3 7 years ago
parent
commit
fa54ea3276
1 changed files with 6 additions and 0 deletions
  1. 6
      youtube_dl_gui/downloaders.py

6
youtube_dl_gui/downloaders.py

@ -211,6 +211,12 @@ class YoutubeDLDownloader(object):
# os.killpg is not available on Windows
# See: https://bugs.python.org/issue5115
self._proc.kill()
# When we kill the child process on Windows the return code
# gets set to 1, so we want to reset the return code back to 0
# in order to avoid creating logging output in the download(...)
# method
self._proc.returncode = 0
else:
os.killpg(self._proc.pid, signal.SIGKILL)

Loading…
Cancel
Save