Module: check_mk
Branch: master
Commit: aac0e510bda6288bca53cc4b66327fa88fa16008
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=aac0e510bda628…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jan 19 19:17:55 2018 +0100
Tests: Not try to clean up versions when no version is installed
Change-Id: I5f8dfdfc378af8f3fc216bdfb1160c07423f76b0
---
tests/testlib/__init__.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/testlib/__init__.py b/tests/testlib/__init__.py
index d5b3570..19612fa 100644
--- a/tests/testlib/__init__.py
+++ b/tests/testlib/__init__.py
@@ -585,6 +585,9 @@ class Site(object):
def cleanup_old_sites(self, cleanup_pattern):
+ if not os.path.exists("/omd/sites"):
+ return
+
for site_id in os.listdir("/omd/sites"):
if site_id != self.id and site_id.startswith(cleanup_pattern):
print "Cleaning up old site: %s" % site_id