This makes it easier to understand what pkg failed.
response = urllib2.urlopen(src_url)
except Exception, e:
if hasattr(e, 'reason'):
response = urllib2.urlopen(src_url)
except Exception, e:
if hasattr(e, 'reason'):
- print 'Download failed. Reason: ', e.reason
+ print 'Downloading from', src_url, 'failed. Reason: ', e.reason
- print 'Download failed. Error code: ', e.code
+ print 'Downloading from', src_url, 'failed. Error code: ', e.code
return
# get the final URL after possible redirect have been followed
return
# get the final URL after possible redirect have been followed