diff options
| author | 2015-04-21 06:51:24 +0200 | |
|---|---|---|
| committer | 2015-04-21 06:51:24 +0200 | |
| commit | 2f8433b6a10505d29a1b63ea8bbd9b0bf3f7d9f6 (patch) | |
| tree | b82a8b5fc0a309f69733b0a004284f4ef45833d8 /pyload/network/HTTPChunk.py | |
| parent | added check of classname == filename (diff) | |
| parent | Merge branch 'pr/n10_ardi69' into 0.4.10 (diff) | |
| download | pyload-2f8433b6a10505d29a1b63ea8bbd9b0bf3f7d9f6.tar.xz | |
Merge pull request #4 from vuolter/0.4.10
vuolter HEAD
Diffstat (limited to 'pyload/network/HTTPChunk.py')
| -rw-r--r-- | pyload/network/HTTPChunk.py | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/pyload/network/HTTPChunk.py b/pyload/network/HTTPChunk.py index 784b64349..85c20d519 100644 --- a/pyload/network/HTTPChunk.py +++ b/pyload/network/HTTPChunk.py @@ -30,7 +30,6 @@ class ChunkInfo(object):          ret = "ChunkInfo: %s, %s\n" % (self.name, self.size)          for i, c in enumerate(self.chunks):              ret += "%s# %s\n" % (i, c[1]) -          return ret @@ -51,7 +50,7 @@ class ChunkInfo(object):          chunk_size = self.size / chunks          current = 0 -        for i in range(chunks): +        for i in xrange(chunks):              end = self.size - 1 if (i == chunks - 1) else current + chunk_size              self.addChunk("%s.chunk%s" % (self.name, i), (current, end))              current += chunk_size + 1 @@ -222,7 +221,7 @@ class HTTPChunk(HTTPRequest):      def writeBody(self, buf): -        #ignore BOM, it confuses unrar +        # ignore BOM, it confuses unrar          if not self.BOMChecked:              if [ord(b) for b in buf[:3]] == [239, 187, 191]:                  buf = buf[3:] @@ -310,7 +309,8 @@ class HTTPChunk(HTTPRequest):          """ closes everything, unusable after this """          if self.fp: self.fp.close()          self.c.close() -        if hasattr(self, "p"): del self.p +        if hasattr(self, "p"): +            del self.p  def charEnc(enc): | 
