mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-05-30 09:32:40 +09:00
Merge 981f87b00fe464fe284055b541a715a4aca1d60d into 3eb8d22ddb8982ca4fb56bb7a8d6517538bf14c6
This commit is contained in:
commit
404b37cdd9
@ -480,7 +480,13 @@ def main(argv=None):
|
||||
except SameFileError:
|
||||
sys.exit('ERROR: fixed output name but more than one file to download')
|
||||
except KeyboardInterrupt:
|
||||
sys.exit('\nERROR: Interrupted by user')
|
||||
print('\nERROR: Interrupted by user')
|
||||
# 'wait and cooperative exit' handling of SIGINT
|
||||
# this signals our parent that we exited because of SIGINT
|
||||
# the compatible parent shell can then stop script execution
|
||||
import signal
|
||||
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
||||
os.kill(os.getpid(), signal.SIGINT)
|
||||
|
||||
|
||||
__all__ = ['main', 'YoutubeDL', 'gen_extractors', 'list_extractors']
|
||||
|
Loading…
x
Reference in New Issue
Block a user