Skip to content

Commit

Permalink
Pylint: enable undefined-variable check
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBasti committed Jun 26, 2016
1 parent d2ab99c commit 366e15b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions dns/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ def maybe_decode(x):
def maybe_encode(x):
return x.encode()
else:
text_type = unicode # pylint: disable=unicode-builtin
text_type = unicode # pylint: disable=unicode-builtin, undefined-variable
binary_type = str
string_types = (
basestring, # pylint: disable=basestring-builtin
basestring, # pylint: disable=basestring-builtin, undefined-variable
)
unichr = unichr # pylint: disable=unichr-builtin
def maybe_decode(x):
Expand Down
12 changes: 6 additions & 6 deletions dns/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,32 +699,32 @@ def _config_win32_fromkey(self, key):
"""Extract DNS info from a registry key."""
try:
servers, rtype = _winreg.QueryValueEx(key, 'NameServer')
except WindowsError:
except WindowsError: # pylint: disable=undefined-variable
servers = None
if servers:
self._config_win32_nameservers(servers)
try:
dom, rtype = _winreg.QueryValueEx(key, 'Domain')
if dom:
self._config_win32_domain(dom)
except WindowsError:
except WindowsError: # pylint: disable=undefined-variable
pass
else:
try:
servers, rtype = _winreg.QueryValueEx(key, 'DhcpNameServer')
except WindowsError:
except WindowsError: # pylint: disable=undefined-variable
servers = None
if servers:
self._config_win32_nameservers(servers)
try:
dom, rtype = _winreg.QueryValueEx(key, 'DhcpDomain')
if dom:
self._config_win32_domain(dom)
except WindowsError:
except WindowsError: # pylint: disable=undefined-variable
pass
try:
search, rtype = _winreg.QueryValueEx(key, 'SearchList')
except WindowsError:
except WindowsError: # pylint: disable=undefined-variable
search = None
if search:
self._config_win32_search(search)
Expand Down Expand Up @@ -826,7 +826,7 @@ def _win32_is_nic_enabled(self, lm, guid, interface_key):
(nte, ttype) = _winreg.QueryValueEx(interface_key,
'NTEContextList')
return nte is not None
except WindowsError:
except WindowsError: # pylint: disable=undefined-variable
return False

def _compute_timeout(self, start):
Expand Down
1 change: 0 additions & 1 deletion pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ disable=
round-builtin,
superfluous-parens,
too-many-lines,
undefined-variable,
unused-argument,
unused-variable,
wrong-import-order,
Expand Down

0 comments on commit 366e15b

Please sign in to comment.