Better error message, add FTP to the URL list.

This commit is contained in:
Chris Johns 2016-03-09 15:35:21 +11:00 committed by Amar Takhar
parent 867016de12
commit c21e8e96ae

View File

@ -40,6 +40,7 @@ role_url = {
"docs": ("Documentation Site", "https://docs.rtems.org/"), "docs": ("Documentation Site", "https://docs.rtems.org/"),
"lists": ("Mailing Lists", "https://lists.rtems.org/"), "lists": ("Mailing Lists", "https://lists.rtems.org/"),
"git": ("Git Repositories", "https://git.rtems.org/"), "git": ("Git Repositories", "https://git.rtems.org/"),
"ftp": ("FTP File Server", "https://ftp.rtems.org/"),
"review": ("Gerrit Code Review", "https://review.rtems.org/"), "review": ("Gerrit Code Review", "https://review.rtems.org/"),
"bugs": ("Bugs Database", "https://devel.rtems.org/wiki/Bugs/"), "bugs": ("Bugs Database", "https://devel.rtems.org/wiki/Bugs/"),
"gsoc": ("Google Summer of Code", "https://devel.rtems.org/wiki/GSoC/"), "gsoc": ("Google Summer of Code", "https://devel.rtems.org/wiki/GSoC/"),
@ -66,7 +67,7 @@ def rtems_resolve_role(name, rawtext, text, lineno, inliner, options={}, content
elif role == "url": elif role == "url":
text, url = role_url[text] text, url = role_url[text]
except KeyError: except KeyError:
msg = inliner.reporter.error("rtems_resolve_role(): %s is not a valid %s" % (text, role)) msg = inliner.reporter.error("rtems_resolve_role: '%s' is not a valid %s" % (text, role))
err = inliner.problematic("ERROR: %s" % rawtext, None, msg) err = inliner.problematic("ERROR: %s" % rawtext, None, msg)
return [err], [msg] return [err], [msg]