Module: check_mk
Branch: master
Commit: fd82c31bdd3c65dde66033f226bf915c1f1d723d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fd82c31bdd3c65…
Author: Florian Kromer <fk(a)mathias-kettner.de>
Date: Wed Feb 13 17:19:32 2019 +0100
logwatch: Fix missing logfile handling
Previously configured but not existing logfiles raised an exception during
agent execution. This werk fixes the handling of missing logfiles.
CMK-1692
Change-Id: Ie0b7b8a0497a592fde12ca206811f1506f7156ba
---
agents/plugins/mk_logwatch | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/agents/plugins/mk_logwatch b/agents/plugins/mk_logwatch
index 7a0b3b5..0f32af3 100755
--- a/agents/plugins/mk_logwatch
+++ b/agents/plugins/mk_logwatch
@@ -837,7 +837,7 @@ def main():
sys.stdout.write('[[[%s:cannotopen]]]' % logfile)
else:
LOGGER.debug("Invalid logfile processing result %s",
process_result)
- elif isinstance(meta_data, None):
+ elif meta_data is None:
sys.stdout.write('[[[%s:missing]]]\n' % logfile)
else:
LOGGER.debug("Invalid parse metadata %s", meta_data)