Upgrade pysnmp to 4.3.5 (#6793)

This commit is contained in:
Fabian Affolter 2017-03-26 15:53:53 +02:00 committed by GitHub
parent ad649009cd
commit 6e44ccf683
3 changed files with 9 additions and 9 deletions

View File

@ -19,7 +19,7 @@ from homeassistant.util import Throttle
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
REQUIREMENTS = ['pysnmp==4.3.4'] REQUIREMENTS = ['pysnmp==4.3.5']
CONF_COMMUNITY = 'community' CONF_COMMUNITY = 'community'
CONF_AUTHKEY = 'authkey' CONF_AUTHKEY = 'authkey'

View File

@ -16,7 +16,7 @@ from homeassistant.const import (
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
from homeassistant.util import Throttle from homeassistant.util import Throttle
REQUIREMENTS = ['pysnmp==4.3.4'] REQUIREMENTS = ['pysnmp==4.3.5']
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
@ -42,9 +42,9 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
def setup_platform(hass, config, add_devices, discovery_info=None): def setup_platform(hass, config, add_devices, discovery_info=None):
"""Set up the SNMP sensor.""" """Set up the SNMP sensor."""
from pysnmp.hlapi import (getCmd, CommunityData, SnmpEngine, from pysnmp.hlapi import (
UdpTransportTarget, ContextData, ObjectType, getCmd, CommunityData, SnmpEngine, UdpTransportTarget, ContextData,
ObjectIdentity) ObjectType, ObjectIdentity)
name = config.get(CONF_NAME) name = config.get(CONF_NAME)
host = config.get(CONF_HOST) host = config.get(CONF_HOST)
@ -114,9 +114,9 @@ class SnmpData(object):
@Throttle(MIN_TIME_BETWEEN_UPDATES) @Throttle(MIN_TIME_BETWEEN_UPDATES)
def update(self): def update(self):
"""Get the latest data from the remote SNMP capable host.""" """Get the latest data from the remote SNMP capable host."""
from pysnmp.hlapi import (getCmd, CommunityData, SnmpEngine, from pysnmp.hlapi import (
UdpTransportTarget, ContextData, ObjectType, getCmd, CommunityData, SnmpEngine, UdpTransportTarget, ContextData,
ObjectIdentity) ObjectType, ObjectIdentity)
errindication, errstatus, errindex, restable = next( errindication, errstatus, errindex, restable = next(
getCmd(SnmpEngine(), getCmd(SnmpEngine(),
CommunityData(self._community, mpModel=0), CommunityData(self._community, mpModel=0),

View File

@ -577,7 +577,7 @@ pysma==0.1.3
# homeassistant.components.device_tracker.snmp # homeassistant.components.device_tracker.snmp
# homeassistant.components.sensor.snmp # homeassistant.components.sensor.snmp
pysnmp==4.3.4 pysnmp==4.3.5
# homeassistant.components.media_player.clementine # homeassistant.components.media_player.clementine
python-clementine-remote==1.0.1 python-clementine-remote==1.0.1