Changeset 11730 in genesis for tools/check-batch-cmd


Ignore:
Timestamp:
Feb 13, 2013, 8:24:01 PM (12 years ago)
Author:
rick
Message:

Handle the infamous airLive case.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/check-batch-cmd

    r11729 r11730  
    5959  var_list = netsnmp.VarList(
    6060   *map(lambda x: netsnmp.Varbind(x),
    61     ['.1.2.840.10036.3.1.2.1.3.5', '.1.2.840.10036.3.1.2.1.3.6', '.1.2.840.10036.3.1.2.1.3.7']))
     61    ['.1.2.840.10036.3.1.2.1.3.5', '.1.2.840.10036.3.1.2.1.3.6', '.1.2.840.10036.3.1.2.1.3.7','.1.3.6.1.2.1.1.5.0']))
    6262 
    6363  sess = netsnmp.Session(Version=1, DestHost=host, Community='public', Timeout=2 * 100000, Retries=1)
     
    6565  if sess.ErrorInd < 0:
    6666    raise CmdError('SNMP Failed -- [%(ErrorInd)s] %(ErrorStr)s (%(DestHost)s)' % vars(sess))
    67   return filter(None, retval)[0]
     67  if not filter(None, retval):
     68    return None
     69  else:
     70    return filter(None, retval)[0]
    6871
    6972
Note: See TracChangeset for help on using the changeset viewer.