Show More
@@ -12,8 +12,6 b' import struct, os, bz2, zlib, tempfile' | |||||
12 | def getchunk(source): |
|
12 | def getchunk(source): | |
13 | """return the next chunk from changegroup 'source' as a string""" |
|
13 | """return the next chunk from changegroup 'source' as a string""" | |
14 | d = source.read(4) |
|
14 | d = source.read(4) | |
15 | if not d: |
|
|||
16 | return "" |
|
|||
17 | l = struct.unpack(">l", d)[0] |
|
15 | l = struct.unpack(">l", d)[0] | |
18 | if l <= 4: |
|
16 | if l <= 4: | |
19 | return "" |
|
17 | return "" | |
@@ -148,8 +146,6 b' class unbundle10(object):' | |||||
148 |
|
146 | |||
149 | def chunklength(self): |
|
147 | def chunklength(self): | |
150 | d = self.read(4) |
|
148 | d = self.read(4) | |
151 | if not d: |
|
|||
152 | return 0 |
|
|||
153 | l = max(0, struct.unpack(">l", d)[0] - 4) |
|
149 | l = max(0, struct.unpack(">l", d)[0] - 4) | |
154 | if l and self.callback: |
|
150 | if l and self.callback: | |
155 | self.callback() |
|
151 | self.callback() |
General Comments 0
You need to be logged in to leave comments.
Login now