Module: check_mk
Branch: master
Commit: 88d01546740bde7aeed765f5ac45c5a307318a51
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=88d01546740bde…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Feb 13 14:10:39 2015 +0100
fileinfo: fixed exception when outof_range_txt was none
---
checks/fileinfo | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/checks/fileinfo b/checks/fileinfo
index 281f6b9..b625db3 100644
--- a/checks/fileinfo
+++ b/checks/fileinfo
@@ -114,7 +114,7 @@ def check_fileinfo(item, params, info):
for line in info[1:]:
if item == line[0]:
if line[1] == "missing":
- return in_timerange and 3 or 0, "File not found" + outof_range_txt
+ return in_timerange and 3 or 0, "File not found" + (outof_range_txt or "")
state = 0
size = int(line[1])
age = reftime - int(line[2])
@@ -124,7 +124,7 @@ def check_fileinfo(item, params, info):
("age", age, get_age_human_readable) ]
if check_definition == False:
- return in_timerange and 3 or 0, "File not found" + outof_range_txt
+ return in_timerange and 3 or 0, "File not found" + (outof_range_txt or "")
return fileinfo_check_function(check_definition, params, outof_range_txt)
# Extracts patterns that are relevant for the current host and item.
Module: check_mk
Branch: master
Commit: abb94ee8fdf850f7de2826e15d96f59f6654bdc1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=abb94ee8fdf850…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Feb 12 14:33:37 2015 +0100
fixed exception when imported_folder attribute was set to None
---
web/htdocs/wato.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 41556b7..84b7337 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -5658,7 +5658,7 @@ class TextAttribute(Attribute):
if self._mandatory and not value:
raise MKUserError("attr_" + self.name(),
_("Please specify a value for %s") % self.title())
- if value.strip() == "" and not self._allow_empty:
+ if not self._allow_empty and value.strip() == "":
raise MKUserError("attr_" + self.name(),
_("%s may be missing, if must not be empty if it is set.") % self.title())