From 5217f1e4d670c94164a15ffe7f46dfa1c6ea738d Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Sat, 16 Jun 2012 14:33:36 +0200 Subject: [PATCH] winfreed.py: print the URL when the download fails This makes it easier to understand what pkg failed. --- winfreed.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winfreed.py b/winfreed.py index 6a5e7b5..ca3cd32 100755 --- 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 'Downloading from', src_url, 'failed. Reason: ', e.reason elif hasattr(e, 'code'): - 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 -- 2.1.4