summaryrefslogtreecommitdiffstats
path: root/module/network
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-08-10 20:18:37 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-08-10 20:18:37 +0200
commit922d6aca5f0a1a3ce9e6fb855a3e55c367069943 (patch)
treeb7aaf8748b5332128e5c6b436da0d7e374ca5085 /module/network
parentcaptcha fix (diff)
downloadpyload-922d6aca5f0a1a3ce9e6fb855a3e55c367069943.tar.xz
some plugin fixes
Diffstat (limited to 'module/network')
-rwxr-xr-xmodule/network/Request.py38
1 files changed, 17 insertions, 21 deletions
diff --git a/module/network/Request.py b/module/network/Request.py
index 8e3ece456..a2bc3ec3d 100755
--- a/module/network/Request.py
+++ b/module/network/Request.py
@@ -147,27 +147,23 @@ class Request:
if not self.dl:
self.dl = True
file = open(filename, 'wb')
- try:
- conn = self.downloader.open(req, post)
- if conn.headers.has_key("content-length"):
- self.dl_size = int(conn.headers["content-length"])
- else:
- self.dl_size = 0
- self.dl_arrived = 0
- self.dl_time = time.time()
- for chunk in conn:
- if self.abort: raise AbortDownload
- self.dl_arrived += len(chunk)
- file.write(chunk)
-
- file.close()
- self.dl = False
- self.dl_finished = time.time()
- return True
- except HTTPError, e:
- print e
- except URLError, e:
- print e
+
+ conn = self.downloader.open(req, post)
+ if conn.headers.has_key("content-length"):
+ self.dl_size = int(conn.headers["content-length"])
+ else:
+ self.dl_size = 0
+ self.dl_arrived = 0
+ self.dl_time = time.time()
+ for chunk in conn:
+ if self.abort: raise AbortDownload
+ self.dl_arrived += len(chunk)
+ file.write(chunk)
+
+ file.close()
+ self.dl = False
+ self.dl_finished = time.time()
+ return True
def get_speed(self):
try: