From d85894fdf5e8427b0fbec14391864d9fff4ea74a Mon Sep 17 00:00:00 2001 From: Erik Reid <erik.reid@geant.org> Date: Sat, 9 Feb 2019 16:54:22 +0100 Subject: [PATCH] use repr instead of obj.prettyPrint --- inventory_provider/snmp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inventory_provider/snmp.py b/inventory_provider/snmp.py index 8bbcc93c..0c2c5046 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, ' -- GitLab