1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 21:54:17 +01:00

util: Fix some exceptions

This commit is contained in:
Johan Andersson 2013-03-25 19:27:26 +01:00
parent 0de19d2c11
commit 370a1b507b

View File

@ -195,9 +195,17 @@ def subtitle_wsrt(options, data):
def select_quality(options, streams):
available = sorted(streams.keys(), key=int)
try:
optq = int(options.quality)
except ValueError:
log.error("Requested quality need to be a number")
sys.exit(4)
if optq:
try:
optf = int(options.flexibleq)
except ValueError:
log.error("Flexible-quality need to be a number")
sys.exit(4)
if not optf:
wanted = [optq]
else: