Handle URLError and IOError when network problem

This commit is contained in:
Ritiek Malhotra
2017-06-16 00:24:09 +05:30
committed by GitHub
parent 10f57b4ae5
commit be088f6dc0

View File

@@ -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: