From 4227f37068bc2b31130e92865ca5b38d26d07a25 Mon Sep 17 00:00:00 2001 From: Deepak Jagannath Date: Thu, 17 Jul 2014 17:10:56 -0700 Subject: [PATCH] Remove unnecessary for loop. --- src/collectors/snmpraw/snmpraw.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/collectors/snmpraw/snmpraw.py b/src/collectors/snmpraw/snmpraw.py index 0591a38eb..c38800bd3 100644 --- a/src/collectors/snmpraw/snmpraw.py +++ b/src/collectors/snmpraw/snmpraw.py @@ -161,11 +161,8 @@ def collect_snmp(self, device, host, port, community): self.log.debug( 'Collecting raw SNMP statistics from device \'{0}\''.format(device)) - for device in self.config['devices']: - dev_config = self.config['devices'][device] - if not 'oids' in dev_config: - continue - + dev_config = self.config['devices'][device] + if 'oids' in dev_config: for oid, metricName in dev_config['oids'].items(): if (device, oid) in self.skip_list: