Re: [pysnmp-users] Bug in 3.3.4 snmpwalk.py?
Brought to you by:
elie
From: John P S. <sp...@is...> - 2003-08-22 09:25:36
|
A list for users of pure-Python SNMP framework <pysnmp-users.lists.sourceforge.net> List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/pysnmp-users>, <mailto:pys...@li...?subject=unsubscribe> List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum=pysnmp-users> Perhaps this is another small bug in the snmpwalk.py example. I try to walk this OID: 1.3.6.1.2.1.1.3 And the error raised is: Traceback (most recent call last): File "snmpwalk.py", line 132, in ? raise str(rsp['pdu'].values()[0]['error_status']) + ' at '\ IndexError: list index out of range Here's my v2c.Response() object printed: Response(version=Version(1), community=Community('xxxxxxxxxx'), pdu=Pdus(response=ResponsePdu(request_id=RequestId(1026), error_status=ErrorStatus(5), error_index=ErrorIndex(0), variable_bindings=VarBindList()))) I see the problem is that this line of code: raise str(rsp['pdu'].values()[0]['error_status']) + ' at '\ + str(vars[rsp.apiGenGetPdu().apiGenGetErrorIndex()-1][0]) In this case, the problem lies with the fact that vars is an empty list: >>> vars = rsp.apiGenGetPdu().apiGenGetVarBind() >>> vars [] I think the device which generated the response isn't doing something right either, but that's another problem. Take care. |