From bdd58902ee8ae7cd46b5c9a5e8ddc91975ce7a22 Mon Sep 17 00:00:00 2001 From: Erik Reid <erik.reid@geant.org> Date: Fri, 5 Jun 2020 09:24:32 +0200 Subject: [PATCH] fixed error check condition --- inventory_provider/snmp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inventory_provider/snmp.py b/inventory_provider/snmp.py index 7947cf35..92cc3a83 100644 --- a/inventory_provider/snmp.py +++ b/inventory_provider/snmp.py @@ -74,7 +74,7 @@ def walk(agent_hostname, community, base_oid): # pragma: no cover 'snmp response pdu error %r at %r' % ( pduErrorIndication, errorIndex and varBinds[int(errorIndex) - 1][0] or '?')) - if errorIndex == 0: + if errorIndex != 0: raise SNMPWalkError( 'sanity failure: errorIndex != 0, ' 'but no error indication') -- GitLab