From c3126505aeadc4199e6a5c8029fb4745df1a36c6 Mon Sep 17 00:00:00 2001 From: Simon Oliver Tveit Date: Wed, 15 May 2024 19:39:52 +0200 Subject: [PATCH] Rename func to be more accurate --- python/nav/asyncdns.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/nav/asyncdns.py b/python/nav/asyncdns.py index 6957637ec9..1fc30938a8 100644 --- a/python/nav/asyncdns.py +++ b/python/nav/asyncdns.py @@ -88,8 +88,9 @@ def lookup_names(): for name in names: for deferred in self.lookup(name): deferred.addCallback(self._extract_records, name) + deferred.addCallback(self._save_result) deferred.addErrback(self._errback, name) - deferred.addCallbacks(self._parse_result) + deferred.addErrback(self._save_result) yield deferred # Limits the number of parallel requests to BATCH_SIZE @@ -116,8 +117,7 @@ def lookup(self, name): def _extract_records(result, name): raise NotImplementedError - def _parse_result(self, name, response): - """Parses the result to the correct format""" + def _save_result(self, name, response): if isinstance(response, Exception): self.results[name] = response else: