Module: check_mk
Branch: master
Commit: 14d71dfc115a44319a2d089520d185412cf4260e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=14d71dfc115a44…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue May 19 17:28:21 2015 +0200
WATO: Fix two exceptions in case of discovery errors
---
web/htdocs/wato.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index a1b4bd9..41c7734 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -3744,7 +3744,7 @@ def mode_bulk_inventory(phase):
host = folder[".hosts"][hostname]
if hostname in failed_hosts:
result_txt += _("Failed to inventorize %s:
%s<br>") % (hostname, failed_hosts[hostname])
- if not host.get("inventory_failed") and not
hosts.get(".folder", {}).get("_lock_hosts"):
+ if not host.get("inventory_failed") and not
host.get(".folder", {}).get("_lock_hosts"):
host["inventory_failed"] = True
save_hosts(folder)
else:
@@ -3754,7 +3754,7 @@ def mode_bulk_inventory(phase):
_("Inventorized host: %d added, %d removed, %d kept, %d
total services") %
tuple(counts[hostname]))
- if "inventory_failed" in host and not
hosts.get(".folder", {}).get("_lock_hosts"):
+ if "inventory_failed" in host and not
host.get(".folder", {}).get("_lock_hosts"):
del host["inventory_failed"]
save_hosts(folder) # Could be optimized, but difficult here