summaryrefslogtreecommitdiffstats
path: root/pyload/network
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-12 14:03:56 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-12 14:03:56 +0200
commit304a42b914cde43a31a935181b0f952c726eee54 (patch)
tree104a496ed690c187a479cde5b829f4e76b21c1cd /pyload/network
parentOther import fixes (diff)
downloadpyload-304a42b914cde43a31a935181b0f952c726eee54.tar.xz
Other import fixes (2)
Diffstat (limited to 'pyload/network')
-rw-r--r--pyload/network/HTTPRequest.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/pyload/network/HTTPRequest.py b/pyload/network/HTTPRequest.py
index 22a4cc604..e450cacfe 100644
--- a/pyload/network/HTTPRequest.py
+++ b/pyload/network/HTTPRequest.py
@@ -3,15 +3,14 @@
from __future__ import with_statement
+import cStringIO
import codecs
+import httplib
import logging
import urllib
import pycurl
-from httplib import responses
-from cStringIO import StringIO
-
from pyload.plugin.Plugin import Abort, Fail
from pyload.utils import encode
@@ -31,7 +30,7 @@ bad_headers = range(400, 404) + range(405, 418) + range(500, 506)
class BadHeader(Exception):
def __init__(self, code, content=""):
- Exception.__init__(self, "Bad server response: %s %s" % (code, responses[int(code)]))
+ Exception.__init__(self, "Bad server response: %s %s" % (code, httplib.responses[int(code)]))
self.code = code
self.content = content
@@ -40,7 +39,7 @@ class HTTPRequest(object):
def __init__(self, cookies=None, options=None):
self.c = pycurl.Curl()
- self.rep = StringIO()
+ self.rep = cStringIO.StringIO()
self.cj = cookies #: cookiejar
@@ -244,7 +243,7 @@ class HTTPRequest(object):
else:
value = self.rep.getvalue()
self.rep.close()
- self.rep = StringIO()
+ self.rep = cStringIO.StringIO()
return value