Skip to content

Commit

Permalink
Rename func to be more accurate
Browse files Browse the repository at this point in the history
  • Loading branch information
stveit committed May 15, 2024
1 parent 179895f commit c312650
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/nav/asyncdns.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit c312650

Please sign in to comment.