Module: check_mk
Branch: master
Commit: 15c8140f5408787edc1e6ebbceab0af9a523b89a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=15c8140f540878…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Mar 27 12:30:08 2017 +0200
Fixed web.log file copy
Change-Id: I39cf59be5a466447b0f10277b33335bd1ff31b56
---
tests/web/test_crawl.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tests/web/test_crawl.py b/tests/web/test_crawl.py
index 58c78bd..2186970 100644
--- a/tests/web/test_crawl.py
+++ b/tests/web/test_crawl.py
@@ -10,7 +10,6 @@ import signal
import threading
import Queue
import traceback
-import shutil
from urlparse import urlsplit, parse_qsl, urlunsplit, urljoin
from urllib import urlencode
from bs4 import BeautifulSoup
@@ -386,7 +385,7 @@ class TestCrawler(object):
# Save the web.log for later diagnose
if self.site.file_exists("var/log/web.log"):
- shutil.copyfile(self.site.read_file("var/log/web.log"),
self.web_log_file())
+ open(self.web_log_file(),
"w").write(self.site.read_file("var/log/web.log"))
if self.errors:
pytest.fail("Crawled %d URLs in %d seconds. Failures:\n%s" %