mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 13:47:35 +00:00
add to .coveragerc and try again to fix warnings.
This commit is contained in:
parent
c471e39fa0
commit
b84d5760eb
@ -30,6 +30,7 @@ omit =
|
|||||||
|
|
||||||
homeassistant/components/browser.py
|
homeassistant/components/browser.py
|
||||||
homeassistant/components/camera/*
|
homeassistant/components/camera/*
|
||||||
|
homeassistant/components/device_tracker/actiontec.py
|
||||||
homeassistant/components/device_tracker/asuswrt.py
|
homeassistant/components/device_tracker/asuswrt.py
|
||||||
homeassistant/components/device_tracker/ddwrt.py
|
homeassistant/components/device_tracker/ddwrt.py
|
||||||
homeassistant/components/device_tracker/luci.py
|
homeassistant/components/device_tracker/luci.py
|
||||||
|
@ -49,6 +49,7 @@ _LOGGER = logging.getLogger(__name__)
|
|||||||
|
|
||||||
_LEASES_REGEX = re.compile(r'(?P<mac>([0-9a-f]{2}[:-]){5}([0-9a-f]{2}))')
|
_LEASES_REGEX = re.compile(r'(?P<mac>([0-9a-f]{2}[:-]){5}([0-9a-f]{2}))')
|
||||||
|
|
||||||
|
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
def get_scanner(hass, config):
|
def get_scanner(hass, config):
|
||||||
""" Validates config and returns a DD-WRT scanner. """
|
""" Validates config and returns a DD-WRT scanner. """
|
||||||
@ -61,6 +62,7 @@ def get_scanner(hass, config):
|
|||||||
|
|
||||||
return scanner if scanner.success_init else None
|
return scanner if scanner.success_init else None
|
||||||
|
|
||||||
|
|
||||||
class ActiontecDeviceScanner(object):
|
class ActiontecDeviceScanner(object):
|
||||||
""" This class queries a an actiontec router
|
""" This class queries a an actiontec router
|
||||||
for connected devices. Adapted from DD-WRT scanner.
|
for connected devices. Adapted from DD-WRT scanner.
|
||||||
@ -119,10 +121,11 @@ class ActiontecDeviceScanner(object):
|
|||||||
telnet.write((self.username + '\n').encode('ascii'))
|
telnet.write((self.username + '\n').encode('ascii'))
|
||||||
telnet.read_until(b'Password: ')
|
telnet.read_until(b'Password: ')
|
||||||
telnet.write((self.password + '\n').encode('ascii'))
|
telnet.write((self.password + '\n').encode('ascii'))
|
||||||
prompt = telnet.read_until(b'Wireless Broadband Router> ').split(b'\n')[-1]
|
prompt = telnet.read_until(b'Wireless Broadband Router> ',
|
||||||
|
'').split(b'\n')[-1]
|
||||||
telnet.write('firewall mac_cache_dump\n'.encode('ascii'))
|
telnet.write('firewall mac_cache_dump\n'.encode('ascii'))
|
||||||
telnet.write('\n'.encode('ascii'))
|
telnet.write('\n'.encode('ascii'))
|
||||||
_=telnet.read_until(prompt).split(b'\n')[1:-1]
|
telnet.read_until(prompt)
|
||||||
leases_result = telnet.read_until(prompt).split(b'\n')[1:-1]
|
leases_result = telnet.read_until(prompt).split(b'\n')[1:-1]
|
||||||
telnet.write('exit\n'.encode('ascii'))
|
telnet.write('exit\n'.encode('ascii'))
|
||||||
except EOFError:
|
except EOFError:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user