summaryrefslogtreecommitdiffstats
path: root/roles/lib_zabbix/library
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2015-09-11 13:01:20 -0400
committerKenny Woodson <kwoodson@redhat.com>2015-09-11 13:01:20 -0400
commit5adc02254b9eb4ac2e308104711eeec7e39b2c4e (patch)
treea3dba9451e7475b3c2ab121bf06bd7ed126ccaf1 /roles/lib_zabbix/library
parenta5011b9ad04c552a5fcda77d08cdb5fa77d40f01 (diff)
downloadopenshift-5adc02254b9eb4ac2e308104711eeec7e39b2c4e.tar.gz
openshift-5adc02254b9eb4ac2e308104711eeec7e39b2c4e.tar.bz2
openshift-5adc02254b9eb4ac2e308104711eeec7e39b2c4e.tar.xz
openshift-5adc02254b9eb4ac2e308104711eeec7e39b2c4e.zip
Fixes for zbx api
Diffstat (limited to 'roles/lib_zabbix/library')
-rw-r--r--roles/lib_zabbix/library/zbx_item.py6
-rw-r--r--roles/lib_zabbix/library/zbx_user.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/roles/lib_zabbix/library/zbx_item.py b/roles/lib_zabbix/library/zbx_item.py
index 11e3c7b2b..2ccc21292 100644
--- a/roles/lib_zabbix/library/zbx_item.py
+++ b/roles/lib_zabbix/library/zbx_item.py
@@ -92,7 +92,7 @@ def get_multiplier(inval):
''' Determine the multiplier
'''
if inval == None or inval == '':
- return None, None
+ return None, 0
rval = None
try:
@@ -101,9 +101,9 @@ def get_multiplier(inval):
pass
if rval:
- return rval, True
+ return rval, 1
- return rval, False
+ return rval, 0
# The branches are needed for CRUD and error handling
# pylint: disable=too-many-branches
diff --git a/roles/lib_zabbix/library/zbx_user.py b/roles/lib_zabbix/library/zbx_user.py
index c916fa96a..62c85c1bf 100644
--- a/roles/lib_zabbix/library/zbx_user.py
+++ b/roles/lib_zabbix/library/zbx_user.py
@@ -164,7 +164,7 @@ def main():
if key == 'usrgrps':
# this must be done as a list of ordered dictionaries fails comparison
- if not all([True for _ in zab_results[key][0] if _ in value[0]]):
+ if not all([_ in value for _ in zab_results[key]]):
differences[key] = value
elif zab_results[key] != value and zab_results[key] != str(value):