From 992d18c46df354e628d1c45de9e9dded25568c75 Mon Sep 17 00:00:00 2001 From: Mikael Wikstrom Date: Fri, 2 Oct 2015 10:40:11 +0200 Subject: [PATCH] fix crach on empty error array cause by no streams --- lib/svtplay_dl/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/svtplay_dl/__init__.py b/lib/svtplay_dl/__init__.py index 315ec91..2c1e165 100644 --- a/lib/svtplay_dl/__init__.py +++ b/lib/svtplay_dl/__init__.py @@ -213,7 +213,8 @@ def get_one_media(stream, options): return if len(videos) == 0: - log.error(error[0].args[0]) + if len(error) > 0: + log.error(error[0].args[0]) else: if options.list_quality: list_quality(videos)