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

Method __del__

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

Source from the content-addressed store, hash-verified

131 self.fh = None
132
133 def __del__(self):
134 if self.fh is None:
135 return
136 self.fh.close()
137 if not self.done():
138 self.plugin.warning("Incomplete file: {!r}".format(self.filename))
139 try:
140 os.rename(self.filename, self.filename + "_INCOMPLETE")
141 except:
142 pass
143 ls = 0
144 le = 0
145 for s, e in self.ranges:
146 if s > le + 1:
147 self.plugin.warning(
148 "Missing bytes between {0} and {1}".format(le, s))
149 ls, le = s, e
150
151 def handleresponse(self, response):
152 # Check for Content Range

Callers

nothing calls this directly

Calls 2

doneMethod · 0.95
closeMethod · 0.45

Tested by

no test coverage detected