SimpleFinance/unbound-ec2 — pull request #10 by whilp (2014-06-17 16:26:10+00:00)
Title: Collect, don't clobber, results in BatchLookupResolver.initialize()

Previously, `_lookup()` returned a dict like `{names:
[addresses]}`. `initialize()` iterated through matching results, calling
`update` on the `lookup_cache` dict for each match. Each update call would
clobber any existing data in a `name` key with a new set of
`addresses`. Practically, this meant that queries that should match several
instances and therefore return round-robin records (with all matching
addresses) instead returned plain A records (with the last matching address).

Here, we add another loop through the `_lookup()` result items and extend the
cache dict with all new addresses found. This restores the expected
round-robin behavior.