Verified Commit e9b5da3a authored by Andrey Vertiprahov's avatar Andrey Vertiprahov
Browse files

Fix error when empty varbinds on NO_SUCH_NAME SNMP error.

parent e0e88642
Pipeline #37298 passed with stages
in 26 minutes and 59 seconds
......@@ -112,7 +112,7 @@ async def snmp_get(
result = resp.varbinds[0][1]
logger.debug("[%s] GET result: %r", address, result)
return result
elif resp.error_status == NO_SUCH_NAME and len(oids) > 1:
elif resp.error_status == NO_SUCH_NAME and resp.varbinds and len(oids) > 1:
# One or more invalid oids
b_idx = resp.error_index - 1
logger.debug(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment