Merge "Suppress Bandit B509 in snmp.py" into stable/victoria

This commit is contained in:
Zuul 2022-10-26 20:12:30 +00:00 committed by Gerrit Code Review
commit 59a11e0fae
1 changed files with 4 additions and 1 deletions

View File

@ -230,7 +230,10 @@ class SNMPClient(object):
object depending on SNMP version being used.
"""
if self.version == SNMP_V3:
return snmp.UsmUserData(
# NOTE(TheJulia): Ignore Bandit error B509 argument parsing as
# the check is for a count of <3 arguments, however our line
# wrapping causes the check to trigger.
return snmp.UsmUserData( # nosec B509
self.user,
authKey=self.auth_key,
authProtocol=self.auth_proto,