Module: check_mk
Branch: master
Commit: abb69f8dc28ea212805dc1c5703fa5d2f497b1a0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=abb69f8dc28ea2…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Feb 14 07:26:01 2013 +0100
FIX: tolerate if no piggyback dir is present
---
modules/check_mk_base.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 5cf3b09..6fbc5a4 100755
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -438,6 +438,9 @@ def store_piggyback_info(sourcehost, piggybacked):
def remove_piggyback_info_from(sourcehost, keep=[]):
removed = 0
piggyback_path = tmp_dir + "/piggyback/"
+ if not os.path.exists(piggyback_path):
+ return # Nothing to do
+
for backedhost in os.listdir(piggyback_path):
if backedhost not in ['.', '..'] and backedhost not in keep:
path = piggyback_path + backedhost + "/" + sourcehost