fall back correctly on creating namespace
This commit is contained in:
parent
fa3f859293
commit
3c5d75c33d
|
@ -668,7 +668,9 @@ def main():
|
|||
|
||||
for namespace in configuration.evaluateXpath("yep:namespace"):
|
||||
name, uri = namespace.prop("name"), namespace.prop("uri")
|
||||
if not namespaces.getUri(name):
|
||||
try:
|
||||
namespaces.getUri(name):
|
||||
except KeyError:
|
||||
ns = namespaces.Namespace(name, uri)
|
||||
application.xpathContext.xpathRegisterNs(name, uri)
|
||||
|
||||
|
|
Reference in New Issue