X-Git-Url: https://git.ao2.it/winfreed.git/blobdiff_plain/6eae74f0c4bde4ad9283e19995607ba74986bf97..4cc2f977f7150638d9bfbcd1c1b65842a4bb2f0f:/winfreed.py diff --git a/winfreed.py b/winfreed.py index 6a5e7b5..e7f186e 100755 --- a/winfreed.py +++ b/winfreed.py @@ -24,14 +24,9 @@ import ConfigParser import urllib2 from progressbar import Bar, ETA, FileTransferSpeed, Percentage, ProgressBar -# TODO: -# - support win64 - -# TODO make OUTPUT_DIR and LANGCODE configurable from command line OUTPUT_DIR = 'downloads' LANGCODE = 'en-US' -# TODO PKG_DIR in $(datadir) or something like that for python projects PKG_DIR = 'pkgs' CHUNK_SIZE = 8192 @@ -74,9 +69,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