Skip to content
Snippets Groups Projects
Commit 18597597 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Don't complain about missing LysINV link on redirected pages; it

is enough to complain on the base page.  Find LysINV links using
the "id" attribute instead of searching for a link to
webware, to allow for hosted systems.
parent f243517f
No related branches found
No related tags found
No related merge requests found
......@@ -41,6 +41,11 @@ def check_host(hostname):
if csub.findNext(attrs={"alt": "#REDIRECT"}):
warning(hostname, "broken redirect")
redirected_from = tree.find(
"a",
attrs={"href":
"/index.php?title=%s&redirect=no" % hostname.capitalize()})
firstpara = csub.findNext("p").string
if firstpara == u"(Det finns för tillfället ingen text på den här sidan.)\n":
warning(hostname, "not documented")
......@@ -48,9 +53,7 @@ def check_host(hostname):
if not csub.findNext(attrs={"href": nagios_url(hostname)}):
warning(hostname, "Nagios link missing")
if not csub.findNext(attrs={"href": re.compile(
"^https://webware.lysator.liu.se/lysinv/Thing\\?id=")}):
if redirected_from is None and not csub.findNext(attrs={"id": "LysINV"}):
warning(hostname, "LysINV link missing")
ok(hostname, "all ok")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment