diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2019-07-23 23:00:55 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-23 23:00:55 +1000 |
commit | 4806651744616bf48abf408034ab9560e33f60ce (patch) | |
tree | 64bc7394a6316f74d0aadd9ee989e30c0c217707 /synapse/http/federation/srv_resolver.py | |
parent | Opentracing Utils (#5722) (diff) | |
download | synapse-4806651744616bf48abf408034ab9560e33f60ce.tar.xz |
Replace returnValue with return (#5736)
Diffstat (limited to 'synapse/http/federation/srv_resolver.py')
-rw-r--r-- | synapse/http/federation/srv_resolver.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/http/federation/srv_resolver.py b/synapse/http/federation/srv_resolver.py index ecc88f9b96..b32188766d 100644 --- a/synapse/http/federation/srv_resolver.py +++ b/synapse/http/federation/srv_resolver.py @@ -120,7 +120,7 @@ class SrvResolver(object): if cache_entry: if all(s.expires > now for s in cache_entry): servers = list(cache_entry) - defer.returnValue(servers) + return servers try: answers, _, _ = yield make_deferred_yieldable( @@ -129,7 +129,7 @@ class SrvResolver(object): except DNSNameError: # TODO: cache this. We can get the SOA out of the exception, and use # the negative-TTL value. - defer.returnValue([]) + return [] except DomainError as e: # We failed to resolve the name (other than a NameError) # Try something in the cache, else rereaise @@ -138,7 +138,7 @@ class SrvResolver(object): logger.warn( "Failed to resolve %r, falling back to cache. %r", service_name, e ) - defer.returnValue(list(cache_entry)) + return list(cache_entry) else: raise e @@ -169,4 +169,4 @@ class SrvResolver(object): ) self._cache[service_name] = list(servers) - defer.returnValue(servers) + return servers |