Skip to content

Commit 7e25252

Browse files
author
Anze
committed
Cleanup
1 parent 85aacd3 commit 7e25252

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

snmpcollector.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,7 @@ def do_snmp(*args, **job_info):
245245
ipv4=job_info["details"]["ipv4"],
246246
))
247247

248-
# filter out only those sensors that are supposed to run at this interval:
249-
affecting_intervals, = args
250-
251-
# initialize session:
248+
# initialize SNMP session:
252249
session_kwargs = {
253250
"hostname": job_info["details"]["ipv4"],
254251
"use_numeric": True,
@@ -270,9 +267,10 @@ def do_snmp(*args, **job_info):
270267
}
271268
else:
272269
raise Exception("Invalid SNMP version")
273-
274270
session = Session(**session_kwargs)
275271

272+
# filter out only those sensors that are supposed to run at this interval:
273+
affecting_intervals, = args
276274
activated_sensors = [s for s in job_info["sensors"] if s["interval"] in affecting_intervals]
277275
for sensor in activated_sensors:
278276
results = []

0 commit comments

Comments
 (0)