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

Commit

Permalink
fix: allow configuring empty v1 and v2 arrays (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
omrozowicz-splunk authored Oct 28, 2021
1 parent 80f70d6 commit 515f23b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions splunk_connect_for_snmp_traps/manager/trap_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ def setup_v1v2c(self, snmp_config):
sudo snmptrap -v 2c -c public localhost:2162 123 1.3.6.1.6.3.1.1.5.1 1.3.6.1.2.1.1.5.0 s test2
"""
for community in snmp_config["communities"].get("v1", None):
for community in snmp_config["communities"].get("v1", []):
logger.info(f"Configuring V1 {community}")
config.addV1System(self._snmp_engine, community, community)

for community in snmp_config["communities"].get("v2", None):
for community in snmp_config["communities"].get("v2", []):
logger.info(f"Configuring V1 {community}")
config.addV1System(self._snmp_engine, community, community)

Expand Down

0 comments on commit 515f23b

Please sign in to comment.