summaryrefslogtreecommitdiffstats
path: root/module/network
diff options
context:
space:
mode:
Diffstat (limited to 'module/network')
-rwxr-xr-xmodule/network/Request.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/module/network/Request.py b/module/network/Request.py
index 8725d0607..1bf8c8255 100755
--- a/module/network/Request.py
+++ b/module/network/Request.py
@@ -102,7 +102,10 @@ class Request:
file = open(filename, 'wb')
req = urllib2.Request(url)
conn = self.downloader.open(req, post)
- self.dl_size = int(conn.headers["content-length"])
+ 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: