summaryrefslogtreecommitdiffstats
path: root/module/network/HTTPDownload.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/network/HTTPDownload.py')
-rw-r--r--module/network/HTTPDownload.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/module/network/HTTPDownload.py b/module/network/HTTPDownload.py
index 3f32295b4..fe8075539 100644
--- a/module/network/HTTPDownload.py
+++ b/module/network/HTTPDownload.py
@@ -63,7 +63,7 @@ class HTTPDownload():
except IOError:
self.info = ChunkInfo(filename)
- self.chunkSupport = True
+ self.chunkSupport = None
self.m = pycurl.CurlMulti()
#needed for speed calculation
@@ -130,7 +130,7 @@ class HTTPDownload():
except pycurl.error, e:
#code 33 - no resume
code = e.args[0]
- if resume is True and code == 33:
+ if code == 33:
# try again without resume
self.log.debug("Errno 33 -> Restart without resume")
@@ -151,7 +151,6 @@ class HTTPDownload():
if not resume:
self.info.clear()
self.info.addChunk("%s.chunk0" % self.filename, (0, 0)) #create an initial entry
- self.info.save()
self.chunks = []
@@ -165,8 +164,8 @@ class HTTPDownload():
chunksDone = set() # list of curl handles that are finished
chunksCreated = False
done = False
- if self.info.getCount() is 0: # This is a resume, if we were chunked originally assume still can
- self.chunkSupport = False
+ if self.info.getCount() > 1: # This is a resume, if we were chunked originally assume still can
+ self.chunkSupport = True
while 1:
#need to create chunks