projects
/
winfreed.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6eae74f
)
winfreed.py: print the URL when the download fails
author
Antonio Ospite <ospite@studenti.unina.it>
Sat, 16 Jun 2012 12:33:36 +0000
(14:33 +0200)
committer
Antonio Ospite <ospite@studenti.unina.it>
Sat, 16 Jun 2012 12:33:36 +0000
(14:33 +0200)
This makes it easier to understand what pkg failed.
winfreed.py
patch
|
blob
|
history
diff --git
a/winfreed.py
b/winfreed.py
index
6a5e7b5
..
ca3cd32
100755
(executable)
--- a/
winfreed.py
+++ b/
winfreed.py
@@
-74,9
+74,9
@@
def download_file(src_url, dest_dir):
response = urllib2.urlopen(src_url)
except Exception, e:
if hasattr(e, 'reason'):
- print 'Download
failed. Reason: ', e.reason
+ print 'Download
ing from', src_url, '
failed. Reason: ', e.reason
elif hasattr(e, 'code'):
- print 'Download
failed. Error code: ', e.code
+ print 'Download
ing from', src_url, '
failed. Error code: ', e.code
return
# get the final URL after possible redirect have been followed