summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/toaster/contrib/tts/urlcheck.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/contrib/tts/urlcheck.py b/bitbake/lib/toaster/contrib/tts/urlcheck.py
index 8514de8956..0820f82e2a 100644
--- a/bitbake/lib/toaster/contrib/tts/urlcheck.py
+++ b/bitbake/lib/toaster/contrib/tts/urlcheck.py
@@ -2,11 +2,12 @@ from __future__ import print_function
2import sys 2import sys
3 3
4import httplib2 4import httplib2
5
6import config 5import config
7import urllist 6import urllist
8 7
9 8
9config.logger.info("Testing %s with %s", config.TOASTER_BASEURL, config.W3C_VALIDATOR)
10
10def validate_html5(url): 11def validate_html5(url):
11 http_client = httplib2.Http(None) 12 http_client = httplib2.Http(None)
12 status = "Failed" 13 status = "Failed"
@@ -23,6 +24,12 @@ def validate_html5(url):
23 status = resp['x-w3c-validator-status'] 24 status = resp['x-w3c-validator-status']
24 errors = int(resp['x-w3c-validator-errors']) 25 errors = int(resp['x-w3c-validator-errors'])
25 warnings = int(resp['x-w3c-validator-warnings']) 26 warnings = int(resp['x-w3c-validator-warnings'])
27
28 if status == 'Invalid':
29 config.logger.warn("Failed %s is %s\terrors %s warnings %s (check at %s)", url, status, errors, warnings, urlrequest)
30 else:
31 config.logger.debug("OK! %s", url)
32
26 except Exception as exc: 33 except Exception as exc:
27 config.logger.warn("Failed validation call: %s", exc) 34 config.logger.warn("Failed validation call: %s", exc)
28 return (status, errors, warnings) 35 return (status, errors, warnings)