MCPcopy
hub / github.com/USArmyResearchLab/Dshell / checkranges

Method checkranges

dshell/plugins/http/riphttp.py:186–202  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

184 return self.complete
185
186 def checkranges(self):
187 self.ranges.sort()
188 current_start = 0
189 current_end = 0
190 foundgap = False
191 # print self.ranges
192 for s, e in self.ranges:
193 if s <= current_end + 1:
194 current_end = e
195 else:
196 foundgap = True
197 current_start = s
198 current_end = e
199 if not foundgap:
200 if (current_end + 1) >= self.size:
201 self.complete = True
202 return foundgap
203
204
205if __name__ == "__main__":

Callers 1

doneMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected