Module: check_mk
Branch: master
Commit: b8346d971e58f2c6cb8a949f57ae651dca3897b9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b8346d971e58f2…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jun 19 17:21:14 2017 +0200
4764 FIX Fixed internal automation error handling when syncing with 1.2.8 or older
Some "internal automation error" messages were not displayed correctly in the
activation dialog when an error occured.
Change-Id: I6ed1ffb7525a6349c882120fa759b4df14c5db66
---
.werks/4764 | 12 ++++++++++++
web/htdocs/watolib.py | 6 ++++++
2 files changed, 18 insertions(+)
diff --git a/.werks/4764 b/.werks/4764
new file mode 100644
index 0000000..23fc765
--- /dev/null
+++ b/.werks/4764
@@ -0,0 +1,12 @@
+Title: Fixed internal automation error handling when syncing with 1.2.8 or older
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1497885615
+
+Some "internal automation error" messages were not displayed correctly in the
+activation dialog when an error occured.
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index bddd9f7..ef8aed4 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -5213,6 +5213,12 @@ class ActivateChangesSite(multiprocessing.Process,
ActivateChanges):
try:
cmk_configuration_warnings = ast.literal_eval(response_text)
+
+ # In case of an exception it returns a str/unicode message. Wrap the
+ # message in a list to be compatible to regular response
+ if type(cmk_configuration_warnings) in [ str, unicode ]:
+ cmk_configuration_warnings = [ cmk_configuration_warnings ]
+
return {
"check_mk": cmk_configuration_warnings
}