Module: check_mk
Branch: master
Commit: e3c87b51e08d244ab476f2e7a1bd793a27388bf5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e3c87b51e08d24…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Apr 11 11:06:38 2017 +0200
Python path replace was done too late
Change-Id: I67786a8ed3eadd0b599ac7d61a4605faadc04baa
---
tests/testlib/__init__.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/testlib/__init__.py b/tests/testlib/__init__.py
index 139ef86..ec0f407 100644
--- a/tests/testlib/__init__.py
+++ b/tests/testlib/__init__.py
@@ -343,8 +343,8 @@ class Site(object):
(self.root, self.version.version_path())) >> 8 != 0:
raise Exception("Failed to set new version to bin/python")
- if os.system("echo 'sys.path.insert(0, \"%s/lib/python\")'
"
- "| sudo tee -a %s/share/check_mk/web/htdocs/index.py
>/dev/null" %
+ if os.system("sudo sed -i \"s|^initialize()$|sys.path.insert(0,
'%s/lib/python')\ninitialize()|g\" "
+ "%s/share/check_mk/web/htdocs/index.py" %
(self.version.version_path(), self.version.version_path())) >> 8 != 0:
raise Exception("Failed to add python module path of fake
version")