1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-28 06:04:17 +01:00

Log all errors, and exit with failure if no video found

Fixes #301
This commit is contained in:
Olof Johansson 2015-11-04 21:10:15 +01:00
parent 409310252d
commit 0ead96f03e

View File

@ -215,9 +215,11 @@ def get_one_media(stream, options):
if options.force_subtitle:
return
if len(videos) == 0:
if len(error) > 0:
log.error(error[0].args[0])
for exc in error:
log.error(str(exc))
if (len(videos) == 0):
sys.exit(2)
else:
if options.list_quality:
list_quality(videos)