handle KeyboardInterrupt silently

This commit is contained in:
Mort Yao 2012-09-01 08:46:46 +02:00
parent 66698f71b8
commit 82f2b8d411
2 changed files with 6 additions and 2 deletions

View File

@ -47,4 +47,8 @@ def any_download_playlist(url, output_dir = '.', merge = True, info_only = False
m.download_playlist(url, output_dir = output_dir, merge = merge, info_only = info_only)
def main():
import sys
try:
script_main('you-get', any_download, any_download_playlist)
except KeyboardInterrupt:
sys.exit(1)