'Fetch MAC addresses from access point via SNMP.'

def get_snmp_data(self):

    devices = []
    (errindication, errstatus, errindex, restable) = self.snmp.nextCmd(self.auth, self.host, self.baseoid)
    if errindication:
        _LOGGER.error('SNMPLIB    error:    %s', errindication)
        return
    if errstatus:
        _LOGGER.error('SNMP    error:    %s    at    %s', errstatus.prettyPrint(), ((errindex and restable[(int(errindex) - 1)][0]) or '?'))
        return
    for resrow in restable:
        for (_, val) in resrow:
            try:
                mac = binascii.hexlify(val.asOctets()).decode('utf-8')
            except AttributeError:
                continue
            _LOGGER.debug('Found    MAC    %s', mac)
            mac = ':'.join([mac[i:(i + 2)] for i in range(0, len(mac), 2)])
            devices.append({'mac': mac})
    return devices
