mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +00:00
styling and version for requirement
This commit is contained in:
parent
7cb0f805ee
commit
ae6f651c7d
@ -40,6 +40,7 @@ omit =
|
|||||||
homeassistant/components/device_tracker/tomato.py
|
homeassistant/components/device_tracker/tomato.py
|
||||||
homeassistant/components/device_tracker/tplink.py
|
homeassistant/components/device_tracker/tplink.py
|
||||||
homeassistant/components/device_tracker/snmp.py
|
homeassistant/components/device_tracker/snmp.py
|
||||||
|
|
||||||
homeassistant/components/discovery.py
|
homeassistant/components/discovery.py
|
||||||
homeassistant/components/downloader.py
|
homeassistant/components/downloader.py
|
||||||
homeassistant/components/keyboard.py
|
homeassistant/components/keyboard.py
|
||||||
|
@ -47,7 +47,7 @@ from homeassistant.components.device_tracker import DOMAIN
|
|||||||
MIN_TIME_BETWEEN_SCANS = timedelta(seconds=10)
|
MIN_TIME_BETWEEN_SCANS = timedelta(seconds=10)
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
REQUIREMENTS = ['pysnmp']
|
REQUIREMENTS = ['pysnmp<=4.2.5']
|
||||||
|
|
||||||
|
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
@ -124,10 +124,12 @@ class SnmpScanner(object):
|
|||||||
_LOGGER.exception("SNMPLIB error: {}".format(errIndication))
|
_LOGGER.exception("SNMPLIB error: {}".format(errIndication))
|
||||||
return
|
return
|
||||||
if errStatus:
|
if errStatus:
|
||||||
_LOGGER.exception("SNMP error: {} at {}".format(errStatus.prettyPrint(), errIndex and varBindTable[-1][int(errIndex)-1] or '?'))
|
_LOGGER.exception("SNMP error: {} at {}".format(
|
||||||
|
errStatus.prettyPrint(),
|
||||||
|
errIndex and varBindTable[-1][int(errIndex)-1] or '?'))
|
||||||
return
|
return
|
||||||
for varBindTableRow in varBindTable:
|
for varBindTableRow in varBindTable:
|
||||||
for _,val in varBindTableRow:
|
for _, val in varBindTableRow:
|
||||||
mac = binascii.hexlify(val.asOctets()).decode('utf-8')
|
mac = binascii.hexlify(val.asOctets()).decode('utf-8')
|
||||||
mac = ':'.join([mac[i:i+2] for i in range(0, len(mac), 2)])
|
mac = ':'.join([mac[i:i+2] for i in range(0, len(mac), 2)])
|
||||||
devices.append({'mac': mac})
|
devices.append({'mac': mac})
|
||||||
|
@ -139,5 +139,5 @@ SoCo==0.11.1
|
|||||||
https://github.com/adrienbrault/python-plexapi/archive/df2d0847e801d6d5cda920326d693cf75f304f1a.zip#python-plexapi==1.0.2
|
https://github.com/adrienbrault/python-plexapi/archive/df2d0847e801d6d5cda920326d693cf75f304f1a.zip#python-plexapi==1.0.2
|
||||||
|
|
||||||
# python-pysnmp (device_tracker.snmp)
|
# python-pysnmp (device_tracker.snmp)
|
||||||
pysnmp
|
pysnmp>=4.2.5
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user