Fix errors when running build.py with default args

Fixes ugly errors when build.py was run (a) with no --substitutions at all, and
(b) without the expected substitutions
pull/977/head
Richard van der Hoff 9 years ago
parent 432c78f3b5
commit be09cd859d

@ -230,7 +230,8 @@ if __name__ == '__main__':
)
parser.add_argument(
"--substitution", action="append",
help="Substitutions to apply to the generated output, of form NEEDLE=REPLACEMENT."
help="Substitutions to apply to the generated output, of form NEEDLE=REPLACEMENT.",
default=[],
)
args = parser.parse_args()

@ -544,15 +544,15 @@ class MatrixUnits(Units):
return {
"rows": [{
"key": "`Client-Server API <client_server.html>`_",
"type": substitutions["%CLIENT_RELEASE_LABEL%"],
"type": substitutions.get("%CLIENT_RELEASE_LABEL%", "unstable"),
"desc": "Interaction between clients and servers",
}, {
"key": "`Server-Server API <server_server.html>`_",
"type": substitutions["%SERVER_RELEASE_LABEL%"],
"type": substitutions.get("%SERVER_RELEASE_LABEL%", "unstable"),
"desc": "Federation between servers",
}, {
"key": "`Application Service API <application_service.html>`_",
"type": substitutions["%CLIENT_RELEASE_LABEL%"],
"type": substitutions.get("%CLIENT_RELEASE_LABEL%", "unstable"),
"desc": "Privileged server plugins",
}, {
"key": "`Identity Service API <identity_service.html>`_",

Loading…
Cancel
Save