diff --git a/inventory_provider/snmp.py b/inventory_provider/snmp.py index 8bbcc93ca8ffc71e19c261ebc618534c8c1cb618..0c2c50461f886e5c719101de3622c3b1dad71c3b 100644 --- a/inventory_provider/snmp.py +++ b/inventory_provider/snmp.py @@ -63,8 +63,8 @@ def walk(agent_hostname, community, base_oid): # pragma: no cover assert not engineErrorIndication, ( 'snmp response engine error indication: %r' % str(engineErrorIndication)) - assert not pduErrorIndication, 'snmp response pdu error %s at %s' % ( - pduErrorIndication.prettyPrint(), + assert not pduErrorIndication, 'snmp response pdu error %r at %r' % ( + pduErrorIndication, errorIndex and varBinds[int(errorIndex) - 1][0] or '?') assert errorIndex == 0, ( 'sanity failure: errorIndex != 0, '