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

download_http: better error message.

This commit is contained in:
Johan Andersson 2013-03-06 10:31:48 +01:00
parent 4cca843143
commit a0443b856b

View File

@ -479,9 +479,9 @@ def download_http(options, url):
try:
response = urlopen(request)
except HTTPError as e:
print "ERROR"
print e.reason
sys.exit()
log.error("Something wrong with that url")
log.error("Error code: %s" % e.code)
sys.exit(5)
try:
total_size = response.info()['Content-Length']
except KeyError: