sys.stderr.write("Warning: %s exists!\n" % destfile)
return
+ if 'Content-Length' not in response.info():
+ sys.stderr.write("Cannot get the size of the file at %s\n" % src_url)
+ return
+
total_size = response.info().getheader('Content-Length').strip()
total_size = int(total_size)