summaryrefslogtreecommitdiffstats
path: root/module/network
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-10-06 23:03:27 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-10-06 23:03:27 +0200
commit0fb91abfb85e0ca394ae9ed1c3bf857ac0f7a2e2 (patch)
tree7a7b0118aeeba444cbb9c22716d1807f6b199997 /module/network
parentdecrypter retry fix, status fix with pycurl error (diff)
downloadpyload-0fb91abfb85e0ca394ae9ed1c3bf857ac0f7a2e2.tar.xz
pycurl cleanup
Diffstat (limited to 'module/network')
-rwxr-xr-xmodule/network/Request.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/module/network/Request.py b/module/network/Request.py
index 7c1e468eb..c0551b042 100755
--- a/module/network/Request.py
+++ b/module/network/Request.py
@@ -286,8 +286,8 @@ class Request:
self.chunkRead += chunkSize
self.dl_arrived += chunkSize
- #self.pycurl.setopt(pycurl.WRITEFUNCTION, writefunc)
- self.pycurl.setopt(pycurl.WRITEDATA, self.fp)
+ self.pycurl.setopt(pycurl.WRITEFUNCTION, writefunc)
+ #self.pycurl.setopt(pycurl.WRITEDATA, self.fp)
try:
self.pycurl.perform()
@@ -344,8 +344,8 @@ class Request:
def get_speed(self):
try:
- #return self.dl_speed
- return (self.dl_arrived / (time.time()- self.dl_time)) / 1024
+ return self.dl_speed
+ #return (self.dl_arrived / (time.time()- self.dl_time)) / 1024
except:
return 0
@@ -360,7 +360,7 @@ class Request:
def progress(self, dl_t, dl_d, up_t, up_d):
if self.abort:
- raise Exception
+ return False
self.dl_arrived = int(dl_d)
self.dl_size = int(dl_t)