X-Git-Url: https://git.ao2.it/winfreed.git/blobdiff_plain/b0483c09d50e673ec761c0518d285d3f9df250ee..24a32336815ad7850319b456340a4c74a0de1a9c:/winfreed.py diff --git a/winfreed.py b/winfreed.py index c465b63..b9da36e 100755 --- a/winfreed.py +++ b/winfreed.py @@ -59,10 +59,15 @@ def download(entry): response = urllib2.urlopen(url) filename = urllib2.unquote(os.path.basename(response.geturl())) + if filename == "": + sys.stderr.write("Debug (%s): filename: %s url: %s\n" %(entry['package'], filename, response.geturl())) + return + destfile = os.path.join(OUTPUT_DIR, filename) if os.path.exists(destfile): - sys.stderr.write("Warning: %s exists!\n" % destfile) + sys.stderr.write("Warning (%s): %s exists!\n" % (entry['package'], destfile)) return + outfile = open(destfile, mode='w') total_size = response.info().getheader('Content-Length').strip()