diff options
Diffstat (limited to 'pyload/network')
-rw-r--r-- | pyload/network/HTTPDownload.py | 8 | ||||
-rw-r--r-- | pyload/network/HTTPRequest.py | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/pyload/network/HTTPDownload.py b/pyload/network/HTTPDownload.py index 90169571c..1e74d4476 100644 --- a/pyload/network/HTTPDownload.py +++ b/pyload/network/HTTPDownload.py @@ -24,11 +24,11 @@ class HTTPDownload(object): def __init__(self, url, filename, get={}, post={}, referer=None, cj=None, bucket=None, options={}, progress=None, disposition=False): self.url = url - self.filename = filename #complete file destination, not only name + self.filename = filename #: complete file destination, not only name self.get = get self.post = post self.referer = referer - self.cj = cj #cookiejar if cookies are needed + self.cj = cj #: cookiejar if cookies are needed self.bucket = bucket self.options = options self.disposition = disposition @@ -151,7 +151,7 @@ class HTTPDownload(object): lastFinishCheck = 0 lastTimeCheck = 0 - chunksDone = set() # list of curl handles that are finished + chunksDone = set() #: list of curl handles that are finished chunksCreated = False done = False if self.info.getCount() is 0: #: This is a resume, if we were chunked originally assume still can @@ -254,7 +254,7 @@ class HTTPDownload(object): if len(chunksDone) >= len(self.chunks): if len(chunksDone) > len(self.chunks): self.log.warning("Finished download chunks size incorrect, please report bug.") - done = True # all chunks loaded + done = True #: all chunks loaded break diff --git a/pyload/network/HTTPRequest.py b/pyload/network/HTTPRequest.py index 1c645f898..92ce6ec4b 100644 --- a/pyload/network/HTTPRequest.py +++ b/pyload/network/HTTPRequest.py @@ -41,16 +41,16 @@ class HTTPRequest(object): self.c = pycurl.Curl() self.rep = StringIO() - self.cj = cookies # cookiejar + self.cj = cookies #: cookiejar self.lastURL = None self.lastEffectiveURL = None self.abort = False - self.code = 0 # last http code + self.code = 0 #: last http code self.header = "" - self.headers = [] # temporary request header + self.headers = [] #: temporary request header self.initHandle() self.setInterface(options) @@ -158,7 +158,7 @@ class HTTPRequest(object): self.c.setopt(pycurl.POST, 1) if not multipart: if type(post) == unicode: - post = str(post) # unicode not allowed + post = str(post) #: unicode not allowed elif type(post) == str: pass else: @@ -250,7 +250,7 @@ class HTTPRequest(object): def decodeResponse(self, rep): """ decode with correct encoding, relies on header """ header = self.header.splitlines() - encoding = "utf8" # default encoding + encoding = "utf8" #: default encoding for line in header: line = line.lower().replace(" ", "") |