From ac6602e3b300f8d5842d0269a669dc6f74058644 Mon Sep 17 00:00:00 2001 From: Marin Atanasov Nikolov Date: Thu, 11 Sep 2014 14:35:16 +0300 Subject: [PATCH] zbx-helper: Discovery methods make use of the 'method' name, so set it as attribute --- src/vpoller/helpers/zabbix.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vpoller/helpers/zabbix.py b/src/vpoller/helpers/zabbix.py index 23e9393..9e40df8 100644 --- a/src/vpoller/helpers/zabbix.py +++ b/src/vpoller/helpers/zabbix.py @@ -101,21 +101,21 @@ def run(self): return self.data['msg'] # The original method requested by the client - method = self.msg['method'] + self.method = self.msg['method'] - if method not in self.methods: + if self.method not in self.methods: logging.warning( '[zbx-helper]: Do not know how to process %s method', - method + self.method ) - return '[zbx-helper]: Do not know how to process %s method' % method + return '[zbx-helper]: Do not know how to process %s method' % self.method logging.debug( '[zbx-helper]: Processing data using %s() method', - self.methods[method].__name__ + self.methods[self.method].__name__ ) - result = self.methods[method]() + result = self.methods[self.method]() logging.debug( '[zbx-helper]: Returning result after data processing: %s',