Skip to content
This repository has been archived by the owner on Dec 17, 2021. It is now read-only.

Commit

Permalink
fix: allow empty communities in config (#104)
Browse files Browse the repository at this point in the history
* fix: allow configuring empty v3 array
  • Loading branch information
omrozowicz-splunk authored Oct 28, 2021
1 parent 515f23b commit 534d6a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion splunk_connect_for_snmp_traps/manager/trap_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def setup_v3(self, snmp_config):
user3: snmpv3test3
sudo snmptrap -e 0x8000000004030203 -v3 -l noAuthNoPriv -u snmpv3test3 localhost:2162 123 1.3.6.1.6.3.1.1.5.1
"""
for user_config in snmp_config["communities"].get("v3", None):
for user_config in snmp_config["communities"].get("v3", []):
# user_config = snmp_config["communities"]["v3"].get(user)
logger.info(f"Configuring V3 {user_config}")
username = user_config.get("userName", None)
Expand Down

0 comments on commit 534d6a8

Please sign in to comment.