File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff 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 = []
You can’t perform that action at this time.
0 commit comments