Changeset 11730 in genesis for tools/check-batch-cmd
- Timestamp:
- Feb 13, 2013, 8:24:01 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/check-batch-cmd
r11729 r11730 59 59 var_list = netsnmp.VarList( 60 60 *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'])) 62 62 63 63 sess = netsnmp.Session(Version=1, DestHost=host, Community='public', Timeout=2 * 100000, Retries=1) … … 65 65 if sess.ErrorInd < 0: 66 66 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] 68 71 69 72
Note:
See TracChangeset
for help on using the changeset viewer.