diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-10-05 20:07:44 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-10-05 20:07:44 +0200 |
commit | faf6fbc956f8c23871c0bcb91a84986ffd689201 (patch) | |
tree | 19afd74d1ba7438816c02689ae3b093c57eea2cc /module/network/Request.py | |
parent | closed #116 (diff) | |
download | pyload-faf6fbc956f8c23871c0bcb91a84986ffd689201.tar.xz |
changed dl function for test purpose
Diffstat (limited to 'module/network/Request.py')
-rwxr-xr-x | module/network/Request.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/module/network/Request.py b/module/network/Request.py index f5c856f6f..21159dde1 100755 --- a/module/network/Request.py +++ b/module/network/Request.py @@ -287,8 +287,9 @@ class Request: self.chunkRead += chunkSize self.dl_arrived += chunkSize - self.pycurl.setopt(pycurl.WRITEFUNCTION, writefunc) - + #self.pycurl.setopt(pycurl.WRITEFUNCTION, writefunc) + self.pycurl.setopt(pycurl.WRITEDATA, self.fp) + try: self.pycurl.perform() except Exception, e: @@ -344,7 +345,8 @@ class Request: def get_speed(self): try: - return self.dl_speed + #return self.dl_speed + return (self.dl_arrived / (time.time()- self.dl_time)) / 1024 except: return 0 |