Module: check_mk
Branch: master
Commit: 7731232c73a01ecddd7682f58fde2587ba0e1871
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7731232c73a01e…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri Jul 13 10:03:44 2018 +0200
Added missing fixes.
Change-Id: Iaf238e7d12976d51e503d63cd03a6d6743c01780
---
cmk/gui/plugins/userdb/hook_auth.py | 2 +-
cmk/gui/plugins/wato/utils.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmk/gui/plugins/userdb/hook_auth.py b/cmk/gui/plugins/userdb/hook_auth.py
index 1b567e2..09afaf7 100644
--- a/cmk/gui/plugins/userdb/hook_auth.py
+++ b/cmk/gui/plugins/userdb/hook_auth.py
@@ -68,7 +68,7 @@ g_auth_base_dir = cmk.paths.var_dir + '/wato/auth'
def format_php(data, lvl = 1):
s = ''
- if isinstance(data, tuple) or isinstance(data, list):
+ if isinstance(data, (list, tuple)):
s += 'array(\n'
for item in data:
s += ' ' * lvl + format_php(item, lvl + 1) + ',\n'
diff --git a/cmk/gui/plugins/wato/utils.py b/cmk/gui/plugins/wato/utils.py
index 72e594b..9a05127 100644
--- a/cmk/gui/plugins/wato/utils.py
+++ b/cmk/gui/plugins/wato/utils.py
@@ -583,7 +583,7 @@ def register_check_parameters(subgroup, checkgroup, title, valuespec,
itemspec,
itemtype = "item"
itemname = itemspec.title()
itemhelp = itemspec.help()
- if isinstance(itemspec, DropdownChoice) or isinstance(itemspec,
OptionalDropdownChoice):
+ if isinstance(itemspec, (DropdownChoice, OptionalDropdownChoice)):
itemenum = itemspec._choices
else:
itemtype = None