Commit c21b0f86 authored by Jason Madden's avatar Jason Madden

Tweak to avoid pylint warning.

parent dc072f31
...@@ -18,16 +18,18 @@ __all__ = [ ...@@ -18,16 +18,18 @@ __all__ = [
# Import the DNS packages to use the gevent modules, # Import the DNS packages to use the gevent modules,
# even if the system is not monkey-patched. # even if the system is not monkey-patched.
dns = import_patched('dns') def _patch_dns():
top = import_patched('dns')
for pkg in ('dns', for pkg in ('dns',
'dns.rdtypes', 'dns.rdtypes',
'dns.rdtypes.IN', 'dns.rdtypes.IN',
'dns.rdtypes.ANY'): 'dns.rdtypes.ANY'):
mod = import_patched(pkg) mod = import_patched(pkg)
for name in mod.__all__: for name in mod.__all__:
setattr(mod, name, import_patched(pkg + '.' + name)) setattr(mod, name, import_patched(pkg + '.' + name))
return top
dns = _patch_dns()
def _dns_import_patched(name): def _dns_import_patched(name):
assert name.startswith('dns') assert name.startswith('dns')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment