From be088f6dc02d598f4486ca337e3cf0bcef6264ff Mon Sep 17 00:00:00 2001 From: Ritiek Malhotra Date: Fri, 16 Jun 2017 00:24:09 +0530 Subject: [PATCH] Handle URLError and IOError when network problem --- spotdl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spotdl.py b/spotdl.py index 3b3477a..5ba9f33 100644 --- a/spotdl.py +++ b/spotdl.py @@ -363,7 +363,7 @@ def grab_list(file): print('') except KeyboardInterrupt: grace_quit() - except ConnectionError: + except (URLError, IOError): lines.append(raw_song) trim_song(file) with open(file, 'a') as myfile: