sacma sapan konfigurasyonu olan sunucularla da calisabilelim..

This commit is contained in:
A. Murat Eren
2005-09-20 11:49:52 +00:00
parent 8ffa27187b
commit f5068056fc
+4 -3
View File
@@ -134,9 +134,10 @@ class Fetcher:
except HTTPException, e:
self.err(('(%s): %s') % (e.__class__.__name__, e))
if headers and not headers.has_key('Content-Length'):
totalsize = 0 # could not get the totalsize of file
else: totalsize = int(headers['Content-Length'])
try:
totalsize = int(headers['Content-Length'])
except:
totalsize = 0
dest = open(os.path.join(self.filedest, self.url.filename()) , "w")
self._do_grab(fileObj, dest, totalsize)