MCPcopy
hub / github.com/django/django / close

Method close

django/http/response.py:332–341  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

330 # See
331 # http://blog.dscpl.com.au/2012/10/obligations-for-calling-close-on.html
332 def close(self):
333 for closer in self._resource_closers:
334 try:
335 closer()
336 except Exception:
337 pass
338 # Free resources that were still referenced.
339 self._resource_closers.clear()
340 self.closed = True
341 signals.request_finished.send(sender=self._handler_class)
342
343 def write(self, content):
344 raise OSError("This %s instance is not writable" % self.__class__.__name__)

Callers 2

test_closedMethod · 0.95
contentMethod · 0.45

Calls 2

clearMethod · 0.45
sendMethod · 0.45

Tested by 1

test_closedMethod · 0.76