diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-10-06 23:03:27 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-10-06 23:03:27 +0200 |
commit | 0fb91abfb85e0ca394ae9ed1c3bf857ac0f7a2e2 (patch) | |
tree | 7a7b0118aeeba444cbb9c22716d1807f6b199997 /module/network/Request.py | |
parent | decrypter retry fix, status fix with pycurl error (diff) | |
download | pyload-0fb91abfb85e0ca394ae9ed1c3bf857ac0f7a2e2.tar.xz |
pycurl cleanup
Diffstat (limited to 'module/network/Request.py')
-rwxr-xr-x | module/network/Request.py | 10 |
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) |