From 9a7ae05f34d7a6f478cd27ac7a9ca4acd03c4edb Mon Sep 17 00:00:00 2001 From: Lewis Franklin Date: Fri, 21 Mar 2014 08:46:28 -0500 Subject: [PATCH] Tabs to spaces, PEP8 compliance --- scripts/api.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/api.py b/scripts/api.py index 959fcaf..6fc1b2d 100755 --- a/scripts/api.py +++ b/scripts/api.py @@ -66,13 +66,15 @@ def check_queue(self, filters=None): def _send_data(self, queue): '''Send the queue data to Zabbix.''' args = 'zabbix_sender -c {0} -k {1} -o {2}' - return_code = 0 - for item in ['memory', 'messages', 'messages_unacknowledged', 'consumers']: + return_code = 0 + for item in ['memory', 'messages', 'messages_unacknowledged', + 'consumers']: key = '"rabbitmq[{0},queue_{1},{2}]"' key = key.format(queue['vhost'], item, queue['name']) value = queue.get(item, 0) - #print "Executing ", args.format(self.conf, key, value) - return_code |= subprocess.call(args.format(self.conf, key, value), shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + return_code |= subprocess.call(args.format(self.conf, key, value), + shell=True, stdout=subprocess.PIPE, + stderr=subprocess.STDOUT) return return_code def check_aliveness(self):