Module: check_mk
Branch: master
Commit: 20480b186c727219fe1e78f2f00201cf7ad5714e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=20480b186c7272…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Wed May 9 09:11:58 2018 +0200
Simplified checks and fixed message.
Change-Id: I81ae6aa58075ae29b9b4415a7dc886e0cc672469
---
cmk/ec/main.py | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/cmk/ec/main.py b/cmk/ec/main.py
index d76eb0c..8c0a512 100644
--- a/cmk/ec/main.py
+++ b/cmk/ec/main.py
@@ -3135,8 +3135,6 @@ class Queries(object):
class Query(object):
- _allowed_formats = set(["python", "plain", "json"])
-
@staticmethod
def make(status_server, raw_query):
parts = raw_query[0].split(None, 1)
@@ -3197,9 +3195,8 @@ class QueryGET(Query):
argument = argument.lstrip(" ")
if header == "OutputFormat":
- if argument not in self._allowed_formats:
- raise MKClientError("Invalid output format \"%s\"
"
- "(allowed are: %s)" % ",
".join(self._allowed_formats))
+ if argument not in ["python", "plain",
"json"]:
+ raise MKClientError("Invalid output format \"%s\"
(allowed are: python, plain, json)" % argument)
self.output_format = argument