mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Upgrade pysnmp to 4.3.2 (#2236)
* Upgrade pysnmp to 4.3.2 * Fix pylint issue
This commit is contained in:
parent
076fdc3f8b
commit
69f2f0f34a
@ -18,7 +18,7 @@ from homeassistant.util import Throttle
|
|||||||
MIN_TIME_BETWEEN_SCANS = timedelta(seconds=10)
|
MIN_TIME_BETWEEN_SCANS = timedelta(seconds=10)
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
REQUIREMENTS = ['pysnmp==4.2.5']
|
REQUIREMENTS = ['pysnmp==4.3.2']
|
||||||
|
|
||||||
CONF_COMMUNITY = "community"
|
CONF_COMMUNITY = "community"
|
||||||
CONF_BASEOID = "baseoid"
|
CONF_BASEOID = "baseoid"
|
||||||
@ -72,7 +72,7 @@ class SnmpScanner(object):
|
|||||||
|
|
||||||
@Throttle(MIN_TIME_BETWEEN_SCANS)
|
@Throttle(MIN_TIME_BETWEEN_SCANS)
|
||||||
def _update_info(self):
|
def _update_info(self):
|
||||||
"""Ensure the information from the WAP is up to date.
|
"""Ensure the information from the device is up to date.
|
||||||
|
|
||||||
Return boolean if scanning successful.
|
Return boolean if scanning successful.
|
||||||
"""
|
"""
|
||||||
@ -88,7 +88,7 @@ class SnmpScanner(object):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def get_snmp_data(self):
|
def get_snmp_data(self):
|
||||||
"""Fetch MAC addresses from WAP via SNMP."""
|
"""Fetch MAC addresses from access point via SNMP."""
|
||||||
devices = []
|
devices = []
|
||||||
|
|
||||||
errindication, errstatus, errindex, restable = self.snmp.nextCmd(
|
errindication, errstatus, errindex, restable = self.snmp.nextCmd(
|
||||||
@ -97,9 +97,10 @@ class SnmpScanner(object):
|
|||||||
if errindication:
|
if errindication:
|
||||||
_LOGGER.error("SNMPLIB error: %s", errindication)
|
_LOGGER.error("SNMPLIB error: %s", errindication)
|
||||||
return
|
return
|
||||||
|
# pylint: disable=no-member
|
||||||
if errstatus:
|
if errstatus:
|
||||||
_LOGGER.error('SNMP error: %s at %s', errstatus.prettyPrint(),
|
_LOGGER.error('SNMP error: %s at %s', errstatus.prettyPrint(),
|
||||||
errindex and restable[-1][int(errindex)-1] or '?')
|
errindex and restable[int(errindex) - 1][0] or '?')
|
||||||
return
|
return
|
||||||
|
|
||||||
for resrow in restable:
|
for resrow in restable:
|
||||||
|
@ -262,7 +262,7 @@ pyowm==2.3.1
|
|||||||
pyserial<=3.0
|
pyserial<=3.0
|
||||||
|
|
||||||
# homeassistant.components.device_tracker.snmp
|
# homeassistant.components.device_tracker.snmp
|
||||||
pysnmp==4.2.5
|
pysnmp==4.3.2
|
||||||
|
|
||||||
# homeassistant.components.sensor.forecast
|
# homeassistant.components.sensor.forecast
|
||||||
python-forecastio==1.3.4
|
python-forecastio==1.3.4
|
||||||
|
Loading…
x
Reference in New Issue
Block a user