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:
parent
0de19d2c11
commit
370a1b507b
@ -195,9 +195,17 @@ def subtitle_wsrt(options, data):
|
|||||||
def select_quality(options, streams):
|
def select_quality(options, streams):
|
||||||
available = sorted(streams.keys(), key=int)
|
available = sorted(streams.keys(), key=int)
|
||||||
|
|
||||||
optq = int(options.quality)
|
try:
|
||||||
|
optq = int(options.quality)
|
||||||
|
except ValueError:
|
||||||
|
log.error("Requested quality need to be a number")
|
||||||
|
sys.exit(4)
|
||||||
if optq:
|
if optq:
|
||||||
optf = int(options.flexibleq)
|
try:
|
||||||
|
optf = int(options.flexibleq)
|
||||||
|
except ValueError:
|
||||||
|
log.error("Flexible-quality need to be a number")
|
||||||
|
sys.exit(4)
|
||||||
if not optf:
|
if not optf:
|
||||||
wanted = [optq]
|
wanted = [optq]
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user