diff options
author | Richard van der Hoff <richard@matrix.org> | 2017-11-24 16:44:56 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2017-11-24 16:47:48 +0000 |
commit | 8b38096a897bc142378d8a1f01fc28c459decc7e (patch) | |
tree | 2bbd1fc896f965468cac014c2300a81a188d5a1d | |
parent | Merge pull request #2701 from matrix-org/rav/one_mediarepo_to_rule_them_all (diff) | |
download | synapse-8b38096a897bc142378d8a1f01fc28c459decc7e.tar.xz |
Fix error handling on dns lookup
pass the right arguments to the errback handler Fixes "TypeError('eb() takes exactly 2 arguments (1 given)',)"
-rw-r--r-- | synapse/http/endpoint.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/http/endpoint.py b/synapse/http/endpoint.py index a97532162f..e2b99ef3bd 100644 --- a/synapse/http/endpoint.py +++ b/synapse/http/endpoint.py @@ -362,8 +362,10 @@ def _get_hosts_for_srv_record(dns_client, host): return res # no logcontexts here, so we can safely fire these off and gatherResults - d1 = dns_client.lookupAddress(host).addCallbacks(cb, eb) - d2 = dns_client.lookupIPV6Address(host).addCallbacks(cb, eb) + d1 = dns_client.lookupAddress(host).addCallbacks( + cb, eb, errbackArgs=("A", )) + d2 = dns_client.lookupIPV6Address(host).addCallbacks( + cb, eb, errbackArgs=("AAAA", )) results = yield defer.DeferredList( [d1, d2], consumeErrors=True) |