mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +00:00
Added pylint disables
This commit is contained in:
parent
050f90d07a
commit
85bf6cb568
@ -76,7 +76,7 @@ class SnmpScanner(object):
|
|||||||
|
|
||||||
self.lock = threading.Lock()
|
self.lock = threading.Lock()
|
||||||
|
|
||||||
self.last_results = {}
|
self.last_results = []
|
||||||
|
|
||||||
# Test the router is accessible
|
# Test the router is accessible
|
||||||
data = self.get_snmp_data()
|
data = self.get_snmp_data()
|
||||||
@ -90,6 +90,8 @@ class SnmpScanner(object):
|
|||||||
self._update_info()
|
self._update_info()
|
||||||
return [client['mac'] for client in self.last_results]
|
return [client['mac'] for client in self.last_results]
|
||||||
|
|
||||||
|
# Ignoring no-self-use warning
|
||||||
|
# pylint: disable=R0201
|
||||||
def get_device_name(self, device):
|
def get_device_name(self, device):
|
||||||
""" Returns the name of the given device or None if we don't know. """
|
""" Returns the name of the given device or None if we don't know. """
|
||||||
# We have no names
|
# We have no names
|
||||||
@ -126,10 +128,12 @@ class SnmpScanner(object):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if errindication:
|
if errindication:
|
||||||
|
#pylint: disable=W1202
|
||||||
_LOGGER.error("SNMPLIB error: {}".format(errindication))
|
_LOGGER.error("SNMPLIB error: {}".format(errindication))
|
||||||
return
|
return
|
||||||
if errstatus:
|
if errstatus:
|
||||||
err = "SNMP error: {} at {}"
|
err = "SNMP error: {} at {}"
|
||||||
|
#pylint: disable=W1202
|
||||||
_LOGGER.error(err.format(errstatus.prettyPrint(),
|
_LOGGER.error(err.format(errstatus.prettyPrint(),
|
||||||
errindex and
|
errindex and
|
||||||
restable[-1][int(errindex)-1]
|
restable[-1][int(errindex)-1]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user