(self, response, index)
| 1611 | self.event = Event() |
| 1612 | |
| 1613 | def got_response(self, response, index): |
| 1614 | with self.connection.lock: |
| 1615 | self.connection.in_flight -= 1 |
| 1616 | if isinstance(response, Exception): |
| 1617 | if hasattr(response, 'to_exception'): |
| 1618 | response = response.to_exception() |
| 1619 | if self.fail_on_error: |
| 1620 | self.error = response |
| 1621 | self.event.set() |
| 1622 | else: |
| 1623 | self.responses[index] = (False, response) |
| 1624 | else: |
| 1625 | if not self.fail_on_error: |
| 1626 | self.responses[index] = (True, response) |
| 1627 | else: |
| 1628 | self.responses[index] = response |
| 1629 | |
| 1630 | self.pending -= 1 |
| 1631 | if not self.pending: |
| 1632 | self.event.set() |
| 1633 | |
| 1634 | def deliver(self, timeout=None): |
| 1635 | """ |
nothing calls this directly
no test coverage detected