(self, callback)
| 390 | self._cache.sweep() |
| 391 | |
| 392 | def remove_callback(self, callback): |
| 393 | hostname = self._cb_to_hostname.get(callback) |
| 394 | if hostname: |
| 395 | del self._cb_to_hostname[callback] |
| 396 | arr = self._hostname_to_cb.get(hostname, None) |
| 397 | if arr: |
| 398 | arr.remove(callback) |
| 399 | if not arr: |
| 400 | del self._hostname_to_cb[hostname] |
| 401 | if hostname in self._hostname_status: |
| 402 | del self._hostname_status[hostname] |
| 403 | |
| 404 | def _send_req(self, hostname, qtype): |
| 405 | req = build_request(hostname, qtype) |