1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

Use super() now that we require python3, less error prone

This commit is contained in:
Ross McFarland
2022-09-15 14:25:47 -07:00
parent 89aa8ee0bc
commit 66debc0b80
13 changed files with 49 additions and 55 deletions

View File

@@ -16,13 +16,11 @@ from octodns.manager import Manager
class AsyncResolver(Resolver):
def __init__(self, num_workers, *args, **kwargs):
super(AsyncResolver, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)
self.executor = ThreadPoolExecutor(max_workers=num_workers)
def query(self, *args, **kwargs):
return self.executor.submit(
super(AsyncResolver, self).query, *args, **kwargs
)
return self.executor.submit(super().query, *args, **kwargs)
def main():