diff options
| author | Bob Halley <halley@dnspython.org> | 2021-12-17 05:44:08 -0800 |
|---|---|---|
| committer | Bob Halley <halley@dnspython.org> | 2021-12-17 05:44:08 -0800 |
| commit | 8e5adc0678761dec57734fbae1d5bf36857ee872 (patch) | |
| tree | d9b25ff1cdc4051888ccfb7f8f35f5819f95982e /dns | |
| parent | 1b47c80c162d5defd2a1b076c18f99d6f24e2d8d (diff) | |
| download | dnspython-8e5adc0678761dec57734fbae1d5bf36857ee872.tar.gz | |
lint and remove unused helpers
Diffstat (limited to 'dns')
| -rwxr-xr-x | dns/win32util.py | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/dns/win32util.py b/dns/win32util.py index b2300dd..05e2163 100755 --- a/dns/win32util.py +++ b/dns/win32util.py @@ -24,7 +24,7 @@ if sys.platform == 'win32': # Windows just stores such values in the registry (see #687). # Check for this and fix it. if domain.startswith('.'): - domain = domain[1:] + domain = domain[1:] return dns.name.from_text(domain) class DnsInfo: @@ -59,16 +59,9 @@ if sys.platform == 'win32': self.start() self.join() return self.info - - - def get_dns_info_from_wmi(): - getter = _WMIGetter() - return getter.get() else: class _WMIGetter: pass - def get(self): - return None class _RegistryGetter: @@ -104,7 +97,7 @@ if sys.platform == 'win32': s = dns.name.from_text(s) if s not in self.info.search: self.info.search.append(s) - + def _config_fromkey(self, key, always_try_domain): try: servers, _ = winreg.QueryValueEx(key, 'NameServer') @@ -231,11 +224,6 @@ if sys.platform == 'win32': lm.Close() return self.info - def get_dns_info_from_registry(): - """Extract resolver configuration from the Windows registry.""" - getter = _RegistryGetter() - return getter.get() - if _have_wmi and _prefer_wmi: _getter_class = _WMIGetter else: @@ -245,4 +233,3 @@ if sys.platform == 'win32': """Extract resolver configuration.""" getter = _getter_class() return getter.get() - |
