Skip to content

Commit

Permalink
zbx-helper: Discovery methods make use of the 'method' name, so set it
Browse files Browse the repository at this point in the history
as attribute
  • Loading branch information
dnaeon committed Sep 11, 2014
1 parent 655dcfb commit ac6602e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/vpoller/helpers/zabbix.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit ac6602e

Please sign in to comment.